19 posts Russian Federation, Volgograd joined 2005-06-16
#1 2005-06-16
Memory leaks in unit arrays How can I avoid memory leaks when using unit arrays?
The problem is that I cant just remove units from the game or use unit groups.
521 posts Denmark joined 2005-05-06
#2 2005-06-17
If you want to remove leaks by removing the units, use a loop. If you want to destroy it if it's a local unit array, use a loop too.
19 posts Russian Federation, Volgograd joined 2005-06-16
#3 2005-06-17
I can't simply remove units from my local array from the game!
The problem is that all units must have numbers - and custom value is already used.
19 posts Russian Federation, Volgograd joined 2005-06-16
#4 2005-06-17
I can't simply remove units from my local array from the game!
The problem is that all units must have numbers - and custom value is already used.
521 posts Denmark joined 2005-05-06
#5 2005-06-17
Sorry but as I can't see the script I can't help you. I suggest you to use the handle vars, get them from
The JASS Vault . Ask questions about them there aswell, I can't help you the next two weeks, as I'm going on holiday
.
318 posts joined 2005-01-18
#6 2005-06-18
To stop leaking from unit arrays you can remove the unit from the game or flush the value of the variable.
local unit U
set U = null
I think this will work.