JASS:
function 2 takes nothing returns nothing
local timer t=GetExpiredTimer()
(do something)
call PauseTimer(t)
call DestroyTimer(t)
set t=null
endfunction
function 1 takes nothing returns nothing
local effect sfx
local timer t
if (condition==true) then
set sfx=AddSpecialEffect("any effect",x,y)
set t=CreateTimer()
(use sfx)
call DestroyEffect(sfx)
set sfx=null
call TimerStart(t,5.,false,function 2)
set t=null
else
(other actions)
endif
endfunction
Does function 1 leak the two handles(sfx,timer) in case the condition is false?
Should I use a null value for both at their declaration?
Thanks in advance.-