- Joined
- Jul 12, 2010
- Messages
- 1,746
Alright guys so I'm like 90% sure this doesn't leak but I wanted to have the opinions of others just to be sure.
Every 6 seconds it picks all units in the unit group and spawns a dark orb at their position, by logic the unit group doesn't leak because it's being used every 6 seconds.
It's not used for once and then forgotten. (therefore leak)
A simple workout to this would be to just use:
So is my trigger ok or does it leak?
-
Power of Darkness loop
-

Events
-


Time - Every 6.00 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in PowerOfDarkness_Group and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Picked unit) is alive) Equal to True
-
-





Then - Actions
-






Set VariableSet Local_p1 = (Position of (Picked unit))
-






Unit - Create 1 Dark Orb for (Owner of (Picked unit)) at Local_p1 facing Default building facing degrees
-






Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
-






Custom script: call RemoveLocation(udg_Local_p1)
-
-





Else - Actions
-
-
-
-
-
It's not used for once and then forgotten. (therefore leak)
A simple workout to this would be to just use:
-
Set VariableSet PowerOfDarkness_Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Warden))
So is my trigger ok or does it leak?



