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

[General] Is there a need to delete local integer?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
You only need to clear local defined local handles because of the handle reference counter that is used by the handle garbage collector. It only allows a handle index to be recycled once there are no references to it. The problem is that although argument defined locals do decrement the counter automatically at the end of the function, local defined locals do not which results in the counter leaking an increment (and thus becoming unrecyclable).
 
Status
Not open for further replies.
Top