HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Memory in Warcraft 3?

02-20-2003, 05:06 PM#1
FyreDaug
I've heard about memory leaks, and how it can get laggy if you use the wrong variables too much yada yada yada.

Can someone explain to me how warcraft 3 uses Local/Global variables (I know what they are, I'm stupid).

The memory leak I don't understand, what is it and why does it happen?

How can lag problems be fixed using local variables?


Hopefully someone can knowledge me on this lol, I'm still kinda lost after the map making itself, I don't know how warcraft 3 runs completely. Thanks.
02-20-2003, 06:05 PM#2
Extrarius
There really isnt agreement on what causes the memory leaks or how to prevent them. Many people have done 'studies' and just about every individual reported something different. The most common apparent cause is killing too many units (like on TD maps where the constantly spawn). Some people say removing units on death fixes it, some people say exploding units on death fixes it, and some people say letting them just decay fixes it, but nobody has any proof other than their own test. Since every test 'proves' something different, it's really hard to say how to fix it.
02-20-2003, 06:52 PM#3
weaaddar
War3 can't handle massive amount of death at once. If you were to kill off 1000 units in 1 second it would cuase horrific lag, but if you were to kill the same 1000 units over 100 seconds it will cuase much less lag.
The memory usage order is as fallow
Living Unit>Hidden unit>Removed Unit>Dead Unit before corpse disapears>(Dead Unit without corpse=Exploded Unit).
Removed units CAN be restored, though for some reason they wil have no model.
The number of triggers in a map and there complexity also increases lag.
We have no idea how the mem alocations of war3 are set up so Local variables are ussually just for organazation issues, and becuase you hate the stupid variables window.