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

Null location/Groups?

Status
Not open for further replies.
Level 22
Joined
Sep 24, 2005
Messages
4,821
You still need to set global variables to null though, since they leak memory if the object their referencing is already removed.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
I heard it was only certain types that could be nulled.
Must be atomic data types.

I also heard it could cause crashes if nulled at the wrong time or something.
Could you please provide a link. I didn't know that, I never authored an entire map, just spell triggers.

Most GUIers just skip this.
That would be bad for periodic triggers, since the leaks would accumulate and make the game lag on computers installed with low memory (1gb below). I guess that would be okay for triggers that only use variables once though.

EDIT: Here's a link to the reference leak I was talking about. Troll-Brain found that one.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
all types that extend agent must be nulled no matter if global or local variable, because agent is reference counted, and until at least one variable references given object, its handleid wont get recycled(4 bytes leak per object)

according to thread provided by Chobibo, if you dont null agent immedietally after you destroy it, it will leak
 
Status
Not open for further replies.
Top