- Joined
- Mar 24, 2008
- Messages
- 184
Hi
I have this trigger:
This trigger gets all the units from a unit group and puts them into another. If i Destroy the second group the 2nd time i'll use the spell it won't work (setting it to null after destroying it doesn't help). Now, my question is:
Is it Ok to don't destroy the group and keep the small leak (which in the end is not a true leak since the group is always the same, just stays in memory for the whole map and gets used by this trigger), or there is some way to destroy the group and set it as empty when the trigger is activated again? As i said, setting it to null doesn't help (or maybe i'm doing it wrong) and it seems i can't set it to empty unit group through GUI commands.
I have this trigger:
-
Actions
- Set TempGroup = Blah
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
- Blah
-
Loop - Actions
- Unit Group - Add all units of TempGroup to Group
- Custom script: call DestroyGroup(udg_TempGroup)
- Wait 5.00 seconds
-
Unit Group - Pick every unit in Group and do (Actions)
-
Loop - Actions
- Blah
- Unit Group - Remove (Picked unit) from Group
-
Loop - Actions
- Custom script: call DestroyGroup(udg_Group)
- Custom script: set udg_Group = null
This trigger gets all the units from a unit group and puts them into another. If i Destroy the second group the 2nd time i'll use the spell it won't work (setting it to null after destroying it doesn't help). Now, my question is:
Is it Ok to don't destroy the group and keep the small leak (which in the end is not a true leak since the group is always the same, just stays in memory for the whole map and gets used by this trigger), or there is some way to destroy the group and set it as empty when the trigger is activated again? As i said, setting it to null doesn't help (or maybe i'm doing it wrong) and it seems i can't set it to empty unit group through GUI commands.