• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

What is a Leak? and how do i fix them?

Status
Not open for further replies.
Level 8
Joined
Jun 2, 2015
Messages
85
Someone has told me that my map "The Unsolvable Revolution" has a lot of leaks, Link to the leaks. also how does one fix these leak issues? is it with scripting? or somesort? can anyone fix them for me? I can't handle the preassure of having this issue. this map is 6 years old... along with every other project i've been working on for Wc3.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,208
Wikipedia describes memory leaks quite well.

In the case of Warcraft III there are both memory leaks and resource leaks. The memory leaks generally are only a problem for older computer systems with very limited memory. Modern computer systems allow Warcraft III to use so much memory it would take an absurd number of leaks to run out of virtual memory address space, by which time a map session has almost certainly ended. Internal resource leaks though are still a huge problem, and can cause performance to degrade to unplayable levels or even crash Warcraft III. To some extent both go hand in hand, however people mainly fix leaks due to resource leakage rather than memory leakage.
 
In case you have tons of triggers I would not really bother to go through each single one.

  1. Read basics tutorial of how preventing: UnitGroups-, PlayerGroups-, Points-, Effects- leaks
  2. Create an extra variable for each of named types above (sometimes "Points" needs 2, but you would see)
  3. Scan all triggers which run very often during the game session (very often is something like each second or so, mostly important for periodic triggers)
  4. And remove all your leaks from these those triggers and just forget the rest.
It can be a pain to go through really all triggers, also triggers that run only once, or so, but the realistic benefit probably won't be even mentionable.
 
Status
Not open for further replies.
Top