• 🏆 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!

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