• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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