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

[JASS] List of variables that need to be nulled pls

Status
Not open for further replies.
Actually timers need to be nulled. As said all agents. Exception is only if you never remove/destroy the object, so there is no sense in nulling it.

Players will be never removed. -> no sense to null players
A static trigger gets usually never destroyed. -> no sense to null it. (if you really never destroy it)

With not nulling timers... You probably mean if you use the library TimerUtils. Then you don't really need to null the timers, too.
The reason for it is simple that the system will re-use the timer instead of destroying/creating it each time.
If you use timers just normaly, you also have to null them.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Local timers must not be nulled?
When you do "DestroyTimer(timer whichTimer)" you also have to set the timer to null.

Players do indeed not care a lot about it.
Triggers are mostly not destroyed so dont have to be nulled either.

However I suppose that nulling the local variable has no effect on the value anyway.
Nulling local variables is never bad and most times good. So nulling all of them is not a bad thing to do is it?
 
Status
Not open for further replies.
Top