Thinking about boolexprs

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:
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. :p

Why would they leak there and not here?
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Why would they leak there and not here?
Failure in hardcoded warcraft code, and all know how blizzard is fast to correct known bugs in jass2 :p

I hope it won't be the same for Starcraft2
 

Magoiche

Member
Reaction score
20
Wow... x.x
This boolexpr is quite a trouble eh?
Anyway, thanks for the answer =]

PS: And now i know how to test if something leak. =]

TriggerRegisterPlayerUnitEvent with null = 73.700k memory usage
TriggerRegisterPlayerUnitEvent with function = 71.600k memory usage
GroupEnumUnitsInRange with function = 71.800k memory usage
GroupEnumUnitsInRange with null = 75.700k memory usage

Hope this helps someone.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top