• 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] Simple Question

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
Every handle (being any variable beside integer and real (strings leak because of wc3's engine but there is no way to remove it so just ignore it)) need to be nulled when it's use is finished.

Obviously a local's use is finished after the function it is in is finished so it must be nulled within it.

Anyway, locations, groups, special effects and such things are POINTERS. They point to objects that hold the real values (location points to a object that holds x,y coordinates, for example) and thus those objects need to be destroyed BEFORE the variable is nulled.

Location - RemoveLocation(var)
Unit Group - DestroyGroup(var)
SFX - DestroyEffect(var)

etc.
 
Status
Not open for further replies.
Top