- Joined
- Oct 11, 2012
- Messages
- 711
Hi guys, does the following code leak?
Or should I do this?
JASS:
function Trig_hInitializingActions takes nothing returns nothing
local group g
set g = CreatingSomeGroup
call ForGroup(g, function callback)
set g = CreatingSomeOtherGroup
call ForGroup(g, function callback)
call DestroyGroup(g)
set g = null
endfunction
Or should I do this?
JASS:
function Trig_hInitializingActions takes nothing returns nothing
local group g1 = CreatingSomeGroup
local group g2 = CreatingSomeOtherGroup
call ForGroup(g1, function callback)
call DestroyGroup(g1)
call ForGroup(g2, function callback)
call DestroyGroup(g2)
set g1 = null
set g2 = null
endfunction
Last edited: