• 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.

[General] What leaks in 1.26?

Level 1
Joined
Jan 12, 2025
Messages
3
G'day mates
Do units leak? It's kind of hard to understand whether or not I need to null unit variables after use.
 
Level 29
Joined
Sep 26, 2009
Messages
2,596
Generally speaking, units do not leak. The only case where unit itself would be considered to leak memory is when you create a dummy unit and do not remove/kill it afterwards. Since dummy units have Locust ability, it makes them invulnerable and unselectable by players. So if you do not kill/remove such unit, it would persist in the game, taking a bit of memory and processing power.

Nulling variables does not clear any leak, unless you are talking about local variables. But that would require you to use JASS scripts. GUI variables (globals) do not really leak anything.
 

I think it covers everything well. On the topic of units, I have heard some discussion of permanent leaks when there's too many units being used on the map (like hundreds of thousands) which is unavoidable, but I might be misremembering.
 
Top