Do regions leak?

LearningCode

New Member
Reaction score
24
I so need to make a "LearningCode's questions!" thread
Do regions leak? o.0

Like, [lJASS]local region blah = bj_mapInitialPlayableArea[/lJASS]
Must I null this?
 

Sickle

New Member
Reaction score
13
First of all, you want [lJASS]rect[/lJASS]s. Regions in Jass are totally different from GUI regions.

Yes, rects leak. But, [lJASS]bj_mapInitialPlayableArea[/lJASS] is a global rect which is not created or destroyed when you use it. You do not need to destroy rect variables referring to it, nor do you need to null them.
 

PrisonLove

Hard Realist
Reaction score
78
Yes, Playable map area should NOT be nulled, because I believe if you do this, you can never refer to it again (as far as I know).

The same goes for the All Players player group (although, I'm not sure if player groups leak at all)
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Actually rect and region is 2 different things. Regions can have many rects in it, but rects is not make up of regions. Well, it is better to null the locals, this is a good coding practice.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top