Causes Leak

keeper77

New Member
Reaction score
3
Do integer variables cause leaks? For instance, I set Variable[1] to etc, and Variable[2] to etc, do I have to, at the end of the trigger, at a custom script to delete these variables? Thank you :D
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
No.

integer, real, code, and boolean do not leak.

In JASS, local handle variables can leak.

strings do leak, but it is impossible to clean them up. The leak is not terrible, and the same string will only leak once (it will re-use the existing string in memory).

In GUI, the main leaks you have to worry about are:

locations (Points) - Remove with [ljass]call RemoveLocation(LOCATION)[/ljass]
groups (Unit Groups) - Remove with [ljass]call DestroyGroup(GROUP)[/ljass]
forces (Player Groups - Excluding "All Players") - Remove with [ljass] call DestroyForce(FORCE)[/ljass]
effects (Special Effects) - Remove with [ljass]call DestroyEffect(EFFECT)[/ljass]

Other types, such as units (dummy units), texttags (Floating Text), timers, and regions (worry about the ones that aren't created in the terrain editor), etc, are not usually something you come across often, but they do cause leaks if you use them incorrectly.

I'd recommend you use our Search function to find a Leak Tutorial.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top