this is a really simple code and i don't know what it's leaking here! how is that possible? My map always crashes, telling there's no memory to execcute some code.
Then, I ended up with this conclusion after disabling trigger by trigger and running the map. Disabling this trigger makes my map run smoothly by 3 hours(had enough of testing).
local variables are set to null. i can't find anything else here.
pls help ^^
PS: there's a second trigger that takes away those abilities from the units affected by this trigger. So, this trigger is called in a periodic event by a third trigger.
Then, I ended up with this conclusion after disabling trigger by trigger and running the map. Disabling this trigger makes my map run smoothly by 3 hours(had enough of testing).
local variables are set to null. i can't find anything else here.
pls help ^^
JASS:
function Trig_Ability_On_Func002A takes nothing returns nothing
local unit U = GetEnumUnit()
if ( IsUnitType(U, UNIT_TYPE_STRUCTURE) == false ) then
if ( GetUnitRace(U) == RACE_DEMON ) then
call UnitAddAbility(U, 039;A002039;)
else
call UnitAddAbility(U, 039;A003039;)
endif
endif
set U = null
endfunction
function Trig_Ability_On_Actions takes nothing returns nothing
local group G = GetUnitsInRectAll(bj_mapInitialPlayableArea)
call ForGroup(G, function Trig_Ability_On_Func002A )
call DestroyGroup(G)
set G = null
endfunction
//===========================================================================
function InitTrig_Ability_On takes nothing returns nothing
set gg_trg_Ability_On = CreateTrigger( )
call TriggerAddAction( gg_trg_Ability_On, function Trig_Ability_On_Actions )
endfunction
PS: there's a second trigger that takes away those abilities from the units affected by this trigger. So, this trigger is called in a periodic event by a third trigger.