- Joined
- May 16, 2012
- Messages
- 644
So, i've moved to Jass to make my MUI triggers easier, and im not sure if this code destroy the created group or not.
So by doing,
, am i destroying the group and cleaning the leak or i should do,
and then
to properly do it?
And how about local triggers? I need to set then to null after registering or they are like integers and real?
JASS:
function ReleaseDmg_Actions takes nothing returns nothing
local unit u
local location l
local group g
set u = GetTriggerUnit()
set l = GetUnitLoc(u)
set g = GetUnitsInRangeOfLocMatching(1000.00, l, Condition(function ReleaseDmg_Filter))
call CreateNUnitsAtLoc( 1, 'n02S', GetOwningPlayer(u), l, bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ForGroupBJ( g, function ReleaseDmg )
set udg_Molten_Store[GetUnitPointValue(u)] = 0
set u = null
set l = null
set g = null
endfunction
So by doing,
JASS:
set g = null
JASS:
call DestroyGroup(g)
JASS:
set g = null
And how about local triggers? I need to set then to null after registering or they are like integers and real?