HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

memory leak

03-07-2005, 05:13 PM#1
Tabris
First, I have to say I have read thread about/ tutorials but...
So here, you got my questions.

Q : What is the difference between remove unit and destroy unit?
A : -um.....

If we don't care about,
Q : does a primitive type (integer, boolean...) leak?
A : -no

Q : does a handle leak?
A : -yes

Q : Does Warcraft 3 something about handles?
A : -no

Q : So we should bother about unit/item killed?
A : -I gess.

Q : All functions get------- returning a handle will leak if the handle is store?
A : -yes

Q : What we have to do to avoid such leaking?
A : -store handle into a variable, then call the specific function to destroy the object, and then set the handle to null.

Q : What is going on if we don't set to null?
A : -.....

Q : What is going on if we call more than once the function to destroy the handle on the same variable?
A : -...

I am kind, I write the answers too. ^_^
Can you tell if i am right?
03-10-2005, 11:11 PM#2
Zoxc
Here a list of anti leaks functions

http://s91887676.onlinehome.us/World...p?showtopic=38
03-11-2005, 04:26 PM#3
Tabris
Quote:
Originally Posted by Zoxc
Here a list of anti leaks functions

http://s91887676.onlinehome.us/World...p?showtopic=38
Thanks. Maybe It will help me. But this is not a answer. ^_^