- Joined
- Dec 13, 2010
- Messages
- 71
When I do something like this:
So when "stuff" is always false, would I still need to call Removelocation(Loc) at the end of the function, even if Loc wasn't used yet?
So the general question about that would be:
Do I have to remove leakable stuff if it was only declared, but not defined?
JASS:
function Actions takes nothing returns nothing
local location Loc
local integer i = 1
loop
if stuff then
set Loc = blabla
call RemoveLocation(Loc)
endif
set i = i + 1
endloop
endfunction
So when "stuff" is always false, would I still need to call Removelocation(Loc) at the end of the function, even if Loc wasn't used yet?
So the general question about that would be:
Do I have to remove leakable stuff if it was only declared, but not defined?