460 posts joined 2004-08-27
#1 2005-10-30
Removing a unit variable, without removing the unit? RemoveUnit()
Removes a unit, and the variable right?
But is there any way, to just remove the variable?
69 posts Denmark joined 2004-03-27
#2 2005-10-30
If you mean a variable set using the handle variables, you just set that variable to null (or 0) and it is cleaned up.
If you mean a global or local variable, it makes no sense trying to remove them.
521 posts Denmark joined 2005-05-06
#3 2005-10-30
You can't really remove variables, but by setting them to null they won't use the memory. This is only important with locals though, just do it at the end of the function.
460 posts joined 2004-08-27
#4 2005-10-30
I was sleepy last night and didint realize that you didint have to remove/destroy the unit-variable before nullifying it
. Sleepyness sucks
.