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

Remove Unit Bug?

Status
Not open for further replies.
Level 16
Joined
Aug 20, 2009
Messages
1,554
I hear there is a Remove unit bug, that made it leak, everytime you wanted to remove a unit.

and you have to explode the unit to fix the bug,

How do you do that in GUI/Jass?

does giving them expiration timer leaks too?

can i have a more detailed information?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Wc3 myths and legends are fun.

Apparently in the past, removing an unit made a leak, i mean with the function RemoveUnit or at the end of the corpse decay.
So the only fix was to recycle units, but in most of cases it brings more problems than it fix.

I remember that i did a leak test and it was either very minor or none at all.

Now, you could still try it, who knows, we had many patches since i did the test.

However i've have never read about the other things.

Also some codes could use the unit death event, ofc it will not fire if you use RemoveUnit, so it could lead to a leak or something.
You could just use KillUnit first to fix that by using a custom RemoveUnit function.
Or just call KillUnit before each RemoveUnit, or even use an hook on RemoveUnit if you want a quick dirty way.

Note that now we can catch the "remove unit event" by a bug exploit, it is done in UnitIndexer for example.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Even if it does, the "leak" is minimal because AFAIK, if you don't remove the unit via trigger, the unit by default will be removed on its own by the duration of 300 seconds from when it dies.

The difference is that, the duration.
If you remove it via trigger it's instant, well if you just kill it, you have to wait 300 seconds for the unit to properly be removed.

Still, 300 seconds is nothing to me.

But when used in large-scale war type of game, this is very important.
 
Level 16
Joined
Aug 20, 2009
Messages
1,554
Even if it does, the "leak" is minimal because AFAIK, if you don't remove the unit via trigger, the unit by default will be removed on its own by the duration of 300 seconds from when it dies.

The difference is that, the duration.
If you remove it via trigger it's instant, well if you just kill it, you have to wait 300 seconds for the unit to properly be removed.

Still, 300 seconds is nothing to me.

But when used in large-scale war type of game, this is very important.

That explanation made sense, Thanks def! xD

[22-53-04] Magtheridon96: Units can actually leak when you remove them
 
Status
Not open for further replies.
Top