• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Matching unit leak?

Status
Not open for further replies.
Level 10
Joined
Jan 28, 2009
Messages
442
I was wondering if MatchingUnit leaks? If I convert this trigger...

  • Events
  • Conditions
    • Condition - If UnitGroup((UnitsInUnitGroup(Mob)) matching condition(MatchingUnit)is Alive)Equal to True))is empty Equal to True
  • Actions
...into JASS, I can see that the closest resemblance I can find to MatchingUnit is something called filterUnit.
I was then wondering: should I call a function that destroys filterUnit after it has been used and AFTER "return True" has happened in the function?

I tried to destroy filterUnit just to see what would happen, but it seems that I don't know which function to call in order to remove a unit.
I know how to destroy a group, but not a single unit, so...

Questions:
1) Does MatchingUnit leak?
2) If so, how do I fix it? By destroying filterUnit... or how?
3) Even if I don't need it NOW, what do I call to destroy a single unit?

I hope that my doubts stand clear.
 
Last edited:
Status
Not open for further replies.
Top