• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Am i making leaks?

Status
Not open for further replies.
I said i already have the locations leakless. I just want to know if using a variable that is not temporary needs to be cleaned. Because "Attackers" unit group variable is none temporary. It is a group of units in a Wave that needs to be ordered to attack a region every 10 seconds. If i destroy Attackers i will lose control over the units.
 
I said i already have the locations leakless. I just want to know if using a variable that is not temporary needs to be cleaned. Because "Attackers" unit group variable is none temporary. It is a group of units in a Wave that needs to be ordered to attack a region every 10 seconds. If i destroy Attackers i will lose control over the units.

Making them attack in the begining won't do anything in the future, they will head at the point where the order (attack) is given and attack. Then you don't need the veriable for the specified group anymore.
 
If you're gonna re-use the group, don't destroy it. If it's you're using it temporarily, destroy it.

Most of the times:
  • Actions
    • Unit Group - Pick every unit in Attackers and do (Actions)
      • Loop - Actions
        • Do stuff
Or;
  • Actions
    • Set Attackers = (Units in (Playable map area))
    • Unit Group - Pick every unit in Attackers and do (Actions)
      • Loop - Actions
        • Do stuff
    • Custom script: call DestroyGroup(udg_Attackers)
 
Status
Not open for further replies.
Back
Top