- Joined
- Aug 18, 2009
- Messages
- 4,099
In your snippet it looks like you are using a global variable. They also create a reference and must be reset to undo it. But unlike local variables, global ones never fall out of scope while the map is being played and can therefore be used anew. So the next time you run that code, it will be overwritten. Global variables in wc3 are also static, you do not allocate them ingame, so your possibility of leaking is fairly limited.
Dynamic global variables would be like entries in a hashtable for example. There you are able to always consume new keys and exhaust the memory continuously. Does FlushChildHashtable/FlushParentHashtable properly clean up the references therein btw?
Dynamic global variables would be like entries in a hashtable for example. There you are able to always consume new keys and exhaust the memory continuously. Does FlushChildHashtable/FlushParentHashtable properly clean up the references therein btw?