AsiaPingPong
New Member
- Reaction score
- 0
Attached is the test map.
I just used the following function to test for leaks with the GroupEnumUnitsInRange() native, and war3's memory usage skyrocketed.
Now, if the single line "call GroupEnumUnitsInRange(g, 0, 0, 1024, b)" is commented out, there are no leaks at all.
Can anyone find any flaws in my test? If not, then this native function must leak.
I just used the following function to test for leaks with the GroupEnumUnitsInRange() native, and war3's memory usage skyrocketed.
JASS:
function SafeFilter takes nothing returns boolean
return true
endfunction
function Trig_Leak_Test_Actions takes nothing returns nothing
local group g = CreateGroup()
local boolexpr b = Condition(function SafeFilter)
call GroupEnumUnitsInRange(g, 0, 0, 1024, b)
call DestroyBoolExpr(b)
call DestroyGroup(g)
set b = null
set g = null
endfunction
//===========================================================================
function InitTrig_Leak_Test takes nothing returns nothing
set gg_trg_Leak_Test = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Leak_Test, 0.001 )
call TriggerAddAction( gg_trg_Leak_Test, function Trig_Leak_Test_Actions )
endfunction
Now, if the single line "call GroupEnumUnitsInRange(g, 0, 0, 1024, b)" is commented out, there are no leaks at all.
Can anyone find any flaws in my test? If not, then this native function must leak.