| 06-09-2010, 02:10 PM | #1 |
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: And please tell me how to remove the other threads ... (i stupidly clicked several times as it was lagging ...) |
| 06-09-2010, 07:59 PM | #2 |
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. |
| 06-09-2010, 08:28 PM | #3 |
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 ?? |
| 06-09-2010, 11:29 PM | #4 |
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. |
| 06-09-2010, 11:48 PM | #5 |
Great :) Thanks :) |
