Romek
Super Moderator
- Reaction score
- 963
> But you leak events, your test is bad.
I figured. That's why it's difficult to tell.
I tried this:
And the memory usage seems to be about the same.
Weird.
Why would they leak there and not here?
I figured. That's why it's difficult to tell.
I tried this:
JASS:
scope test initializer Init
globals
group G = CreateGroup()
trigger T = CreateTrigger()
endglobals
function Tr takes nothing returns boolean
return true
endfunction
private function Exp takes nothing returns nothing
set T = CreateTrigger()
//call TriggerRegisterPlayerUnitEvent(T, Player(0), EVENT_PLAYER_UNIT_DEATH, null)
call TriggerRegisterPlayerUnitEvent(T, Player(0), EVENT_PLAYER_UNIT_DEATH, Filter(function Tr))
call DestroyTrigger(T)
//call GroupEnumUnitsInRange(G, 0., 0., 0., null)
// call GroupEnumUnitsInRange(G, 0., 0., 0., Filter(function Tr))
endfunction
private function Init takes nothing returns nothing
call TimerStart(CreateTimer(), 0.01, true, function Exp)
endfunction
endscope
And the memory usage seems to be about the same.
Weird.
Why would they leak there and not here?