Automatic Memory Leak Destroyer

User avatar
Enalias
Site Admin
Site Admin
Posts: 200
Joined: Sat Sep 15, 2018 1:57 pm
Reputation: 9
Location: Florida, U.S.A.
Website: http://chaosrealm.co/memberlist.php?mod ... rofile&u=2
Discord: https://discord.gg/BUEZkef
Twitch: https://www.twitch.tv/enalias
Contact:
United States of America

Automatic Memory Leak Destroyer

#1

Post by Enalias » Mon Nov 05, 2018 12:10 pm

Automatic Memory Leak Destroyer by MapperMalte

Type: System
Category: vJASS


Quote: this system is too cool to be real!!

Quote: Wow, this is probably the greatest thing to happen for GUI users in the history of WC3 modding. My hat is off to you

Quote: You shall soon become a god amongst GUI users

Quote: Too bad it didn't come out years ago.

This is an Automatic memory Leak Destroyer!
It catches all the memory leaks you cause by using locations/groups or effects in GUI and destroys them automatically.

There is just one thing you have to care about when using this:
Each variable that you use, filled with a group, a location or an effect, that has
to be filled for more than CLEAN_UP_INTERVAL seconds, has to be protected with
a simple function:

call ProtectHandle(udg_###)

where ### stands for the variable name.

Note: This gives DoNothing a sense.
When you call DoNothing, the destroy thread is started and the caught data are destroyed after CLEAN_UP_INTERVAL seconds, ignoring if the number of caught handles is bigger than MIN_LEAK_NUMBER.
Normally you never have to use it, but you can do so.


And not only things like this, all leaks.
This can also be used as an addition to your own leak cleaning, if you forgot something.
It wont break, when you destroy your leaks on your own
You do not have the required permissions to view the files attached to this post.

Return to “Systems”

×