HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Questin about : local variable and antileaks !

05-20-2006, 01:53 AM#1
chien86
in my code:

Quote:
local location point
... do something
call RemoveLocation(point)
set point = null

Quote:
local group tempgroup
... do something
call DestroyGroup(tempgroup)
set tempgroup = null
......
And my question is :
Need I set local var to null after Remove or Destroy It ?
And if yes ? then one more question :D : What does extract action "RemoveLocation(point)" and "set point = null" do ? Different what ?

And what about some more local var: timer, trigger, action, condition ?
05-20-2006, 02:11 AM#2
Chuckle_Brother
Destroying it destroys the actual object your variable is pointing to( think C++ and destroying dynamically created objects), and nulling it effectively blanks the memory, and fixes some sort of internal error and allows it to free the memory properly.
05-20-2006, 05:15 AM#3
PipeDream
http://www.wc3campaigns.net/showthread.php?t=81872
05-20-2006, 09:01 AM#4
Tim.
Also, please use [jass] tags not [quote] tags. Thanks.