Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   Triggers & Scripts (http://www.wc3c.net/forumdisplay.php?f=8)
-   -   Does Getting Unit Group make leaks ?? (http://www.wc3c.net/showthread.php?t=109500)

GolluM[KoMe] 06-09-2010 03:10 PM

Does Getting Unit Group make leaks ??
 
Does Getting Unit Group make leaks (by exemple how many units in unit group?) ?? (in GUI) (or getting player group)
Maybe conditions don't make any leaks ?

And does "custom script : set bj_wantDestroyGroup = true" only works for the next created group or for the whole trigger ?
+ If I use a region in an unit group, does it leak, even with the function above ?

Does this work ?
Trigger:
Custom script: set bj_wantDestroyGroup=true
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Kill (Picked unit))

Or only this ?
Trigger:
Custom script: set bj_wantDestroyGroup=true
Collapse Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Unit - Kill (Picked unit)

And please tell me how to remove the other threads ... (i stupidly clicked several times as it was lagging ...)

0zyx0 06-09-2010 08:59 PM

Setting bj_wantDestroyGroup to true, does only apply for the next time the variable is accesed, since this particular variable is set to false when used. As for the two action strips, they don't leak a group, but can leak other handles (for example locations) if you are not careful.

GolluM[KoMe] 06-09-2010 09:28 PM

Okay thanks a lot !!

So this doesnt leak ? :
Trigger:
Custom script: set bj_wantDestroyGroup=true
Hero - Give (Last created item) to (Random unit from (Units in RamlondRegion <gen> matching (((Unit-type of (Matching unit)) Egal √* Market) and ((Number of items carried by (Matching unit)) Inf√©rieur √* 6))))


I mean, doest it work with events that is not basically an Unit Group one but that uses Unit Groups ??

Ammorth 06-10-2010 12:29 AM

no, that does not leak.

Using bj_wantDestroyGroup within GUI will cause the unit group created by the Enum to be destroyed after use. As long as you don't use other leaking GUI functions in the group loop (center of region, position of unit, etc) it wont leak.

GolluM[KoMe] 06-10-2010 12:48 AM

Great :) Thanks :)


All times are GMT. The time now is 04:46 PM.

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services