WC3JASS Jass Theory & Questions
[Knowledge Construction] JASS mythbusters.


Hello Jassers:

I want to start a thread where we can put all the stuff that makes you doubt about jass. Specifically questions related to efficiency and code development.

The idea is that this thread will show in the first post a table with all the information we can gather, and it will serve as a point of reference for support in other questions dine in this site.

Question 1Answer 1

Let's start with the first question: At the end, what produces leaks and what not?

Dont' forget to provide a test map with the sample code, etc :)


Sorry but i have no more motivation for such things.
But i suppose this thread could be more or less useful :


I really don't have the will to make a test-map for this, but these are all the very leaky things in Warcraft III:

- Locations
- Groups
- Forces
- Special Effects
Things that cannot be destroyed:
- Terrain Deformations
- Trackables
- Events

Things that should be nulled when declared locally:
Anything that extends the 'agent' type in common.j.


And what about players?? they extend agent but in theory they don't leak because they're constants. Is that totally true??


Note that what Mag said is only a theory, it is hardly a fact.

So we shouldn't null unitpool and itempool  ?! (just as an example)

My opinion about it : just null everything which is not code, string, boolean, integer.
Regardless how the handle is recycled (with a handle reference counter like an unit, or without like an image)

Also about players i've heard that some people null them to fix a leak problem with their maps, however frankly i have never met an enough reliable people to believe this, but that doesn't mean it's not true.

About leak event i'm not sure, maybe it's cleaned when the trigger is destroyed, and well maybe it depends if there is one or more events registred to the same trigger.

PS :

But this is 100 % true : GUI eats childrens.