• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] kill\explode\remove

Status
Not open for further replies.
Level 11
Joined
Dec 31, 2007
Messages
780
ive been searching in internet for a good explanation about this.. and i only got more confused than what i used to be:ugly:

so... i need some nice person to explain... which is the best way to remove a unit from the MEMORY... kill unit leaks... i know... but ive seen somewhere that remove also leaks... how about hide unit,Explode unit? or just explode?...

Thx in advance ^^:wink:
 
Make unit not decay and not revivable
hide and kill it
it will be in memory for some time
but it will get repleaced after some seconds

and HINDYhat sais Remove Unit is not safe about leaks
 
As its stated in its name, it explodes unit. When Blizz was creating W3, nobody knew that leaks exist ; o

You'd check if unit is revivable and if its not = remove it/do what O2 said. Im not sure if there is a condition checking if unit is revivable, though.
 
raft, people have known that leaks exist for ages, they're a basic programming concept. It's just that most languages have garbage collectors to deal with that sort of garbage, or only work in primitive types which don't need to worry about it.

Anyways, RemoveUnit doesn't directly leak, but it isn't safe due to the fact that it doesn't fire death events (though Kill+Remove will).

KillUnit is fine, but the unit takes a while to decay.

SetUnitExploded effectively skips decay upon KillUnit, and changes the death animation to a blood splash.
 
Status
Not open for further replies.
Back
Top