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

Local Arrays

Status
Not open for further replies.

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,551
Hi, I have a question about JASS's local array variables.

As you may already know, calling a local array creates 8192 variables or something around that.
My question is, since the array itself can't be nullified, we nullify only the variables that we use, right? The other variables won't leak, will they?

~Thanks for your time
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Sure you only null the used ones
I guess you dont know what nulling does
HINDYhat will see and say what it does I hope
I wont annoy myself for explaining
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Nulling doesnt mean destroying variable
For example we have a box and its id is 1
and there is a variable that points the box
variable points the box ? not exactly, it points the object with 1 id
when this box gets removed that variable still points object with 1 id which is no unit
When we create another box it wants to take id 1 because the object with 1 id got removed
But there is still a variable that points 1 id object
So for preventing that variable from pointing new box
new box gets id 2
if there is no variable or it points another thing new box gets id 1
higher id = lag
HIGHer id = crash
So you can make it point another permanent unit too instead of nulling

All pros will agree with me I guess
Result: Null the ones you use
 
Status
Not open for further replies.
Top