Does unit variablle leak if cahnged often?

afisakov

You can change this now in User CP.
Reaction score
37
I have a line in my code that looks like this
Code:
set myha[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]=GetTriggerUnit()
I am trying to use it to keep track of each player's hero, although it probably runs a little more often then it should.
myha is unit array
Is it fine to leave as is of do I have to set the unit=null or something like that to clean up?
 

denmax

You can change this now in User CP.
Reaction score
155
You can set it as soon as the player picks his Hero.. as long as said unit is not removed from the game in any trigger, there is no need setting the unit array a second time.
 

Crimson

Member
Reaction score
3
As far as I know, units leak a little. It's not as much as locations or unit groups but they still leak. There's no harm in nulling them at the end so maybe you should do that.
 
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