• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Does ((Automatic Memory Leak Destroyer)) really work ?

Status
Not open for further replies.
Level 4
Joined
Dec 22, 2016
Messages
67
Sorry if I'm asking a lot & sorry if it is not related to this part , but there is a system in the link below , it says automatically removes leaks, I mean how can it be possible? Just copy it into my full GUI map and it will do the rest ? no configuration needed?Is it Magic??? I mean It has no problems? It doesn't remove my defined variables and ruining the spells? ex : set variable ((MyPaladin)) to ((Casting Unit)) , does this system make MyPaladin null?

System Link :Automatic Memory Leak Destroyer

And again sorry for my noobness!
 
It catches only some popular leaks. There are a lot of functions it doesn't cover, e.g. distance between two points. And if you want to control when something is destroyed or not, e.g. a spell effect that lasts X seconds, you have to call this function:
JASS:
call ProtectHandle(udg_MyVariable)

That way the system won't automatically clean it up. (but if you do that, then it is your responsibility to remove the leak)

So if you put it in your map right away, you may or may not see bugs. It might destroy things too early for you, but it depends on what types of spells and triggers you have. That's why it is still worth it to learn how to remove leaks yourself. :)
 
Status
Not open for further replies.
Top