• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

question about leaks

Status
Not open for further replies.
Level 11
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
544
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