Warcraft III resources & community, 2003–2006 · archived

ForGroupWithCleanup

not rated
Submitted by AltSubmitterExecution0 downloads
Use this when you want the group variable you're performing the grouping on to be destroyed. Usually the GUI creates a group and passes it to ForGroupBJ -- this group never gets deleted and causes a memory leak, eventually leading to instability if you have lots of groupings. Replace calls to ForGroupBJ with this and the memory leaks will go away. Just make sure you don't pass any groups to it you still need to use afterwards.

Source

function ForGroupWithCleanup takes group whichGroup, code callback returns nothing
    call ForGroup(whichGroup, callback)
    call DestroyGroup(whichGroup)
endfunction

Comments

0

No comments.