• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[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