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

question about leaks

Status
Not open for further replies.
Level 12
Joined
Jul 17, 2013
Messages
544
upload_2021-3-1_16-34-16.png
does this action leak? does it create every new player group once i use it? i generally know what leaks it but im kinda still confused in wc3 editor about it.
 
Level 13
Joined
Feb 5, 2018
Messages
567
No. The Player groups that are the by default always return and use the same value AFAIK.

Additionally Player groups don't leak if the reference is never lost, same with all other leaks too like locations.

Generally speaking the leaks are only there when a reference to something is lost and not cleared.
Example:
Setvariable AlliedTeam = Players 1,2,3,4
Pick every player in AlliedTeam
do actions

Then if you don't want to ever use this gain you need to destroy the playergroup before setting AlliedTeam into a new value.

Because if we then made:
Setvariable AlliedTeam = Players 5,6,7,8

The first made player group of 1,2,3,4 would not have reference anymore and it would then leak.
 
Status
Not open for further replies.
Top