- Joined
- Feb 27, 2019
- Messages
- 401
Hello,
I'm developing a Hero Defense map. Since it's the concept, many ennemy units & heroes die during the game.
I want to be sure to avoid memory leakage when the game time passes, so can you please help me figuring out what units are automatically removed by the WarcraftIII engine, and which ones need to be removed manually by triggers.
Depending on:
- Hero or not (I don't want to ressurect the heroes btw)
- Raisable or not
- Decayable or not
Maybe others parameters that I don't know ?
Also what's the best way to remove them ? Something like the one below ?
I'm developing a Hero Defense map. Since it's the concept, many ennemy units & heroes die during the game.
I want to be sure to avoid memory leakage when the game time passes, so can you please help me figuring out what units are automatically removed by the WarcraftIII engine, and which ones need to be removed manually by triggers.
Depending on:
- Hero or not (I don't want to ressurect the heroes btw)
- Raisable or not
- Decayable or not
Maybe others parameters that I don't know ?
Also what's the best way to remove them ? Something like the one below ?
-
Events
-
Unit - a unit Dies
-
-
Conditions
-
<Conditions to be answered>
-
-
Actions
-
Custom script: local unit u = GetTriggerUnit()
-
Wait XX seconds // Enough time for decay/raise... to be over/impossible ?
-
call RemoveUnit(u)
-