• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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 12
Joined
Feb 5, 2018
Messages
526
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