Handle > Player

T.s.e

Wish I was old and a little sentimental
Reaction score
133
You don't need to null players. Players can't be destroyed or created, only defeated or victorized.
 

Trollvottel

never aging title
Reaction score
262
Cohadar talked about something like this before. Wc3 has a handle recycler which recycles data which dont exist anymore if there is no reference to them. so handles like locations would cause handle leaks if destroyed but not nulled. but player variables will exist the whole game because you cant destroy them so you dont have to null them.
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
If you destroy a handle, so it must be nulled too.
JASS:
call DestroyGroup(g)

Must be nulled.
JASS:

Must be nulled.
JASS:
call DefeatPlayer(p)

Must not be nulled, since the player still exists in the memory.

-Beaten.
 

SFilip

Gone but not forgotten
Reaction score
634
> Must not be nulled
"Must not" isn't the right thing, "doesn't have to" fits better.

To sum it all up, things that won't be destroyed through the whole game (players, boolexprs, heroes, global locations/rects/regions...) never have to be nulled.
 
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