Warcraft III resources & community, 2003–2006 · archived

Memory Leaks

3 posts
#1

Memory Leaks

Alright, so I'm trying to clean up the memory leaks with my spells, but I'm confused. I thought I needed a different variable for each effect, point, etc. Or can I use one?

For example, in my trigger enhanced spells, I (naturally) often use the target of the spell as a point and I assign that to a variable. Do I need a SpellLocation1 and a SpellLocation2, 3, 4... for each different spell? Or can I recycle SpellLocation in all of my spells?

I hope you know what I mean.
#2
you don't
#3
As long as the processes are instant for EVERY USE, you can recycle your variable.