• 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.

One more memory leak question

Status
Not open for further replies.
I came across a blog where two people were discussing a specific trigger function...

"Do X action to "random unit from 'y unit group'" matching "matching unit has z condition""

One of the guys said that this function leaks... and not just a minor leak, a major one.

I am curious if this is actually a leak, or if that guy just didn't know what he was talking about. To be honest, I have this function playing hundreds, if not thousands of times during the course of my map (depending on which heroes are being used). Typically for "matching unit is a hero".

Does anyone have any knowledge of the "Random unit from unit group" function? Is this something that I should avoid? If it does, I'm guessing I'll have to set a unit variable at the beginning of a hero's selection that identifies that unit, and then re-assign that variable to the unit via a "unit enters playable map area" trigger so that when they use an ability like Metamorphosis or Robo-goblin (both of which annoyingly remove the variable assignment).

Is there a better way to do this?
 
Status
Not open for further replies.
Top