Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Neither booleans, and you can not do anything about strings. They create small leak, although there is no way for removing them. This should be your next lecture.
If you create it, it will stay until it is removed. For example, creating a group or a unit. If you no longer reference something and you don't remove it, that's a leak (it's sitting around in your map). For example, enumerating through a group and then never destroying that group.
If you reference something that is created and can be destroyed, that reference (the pointer) will leak. If it didn't leak, there would be a possibility of a unit pointer referencing a timer-
JASS:
local unit u=CreateUnit()
local timer t
call RemoveUnit(u)
set t=CreateTimer()
//u would reference t if pointers were recycled regardless of what was referencing them
So yes, you have to null your pointers, otherwise they are never reused and the handle table (a hashtable) gets cluttered.
Code, boolean, string, real and integer are the only things that don't leak.
You wouldn't know what a "code" type is if you work in GUI, but the rest
are all familiar.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.