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

Help Me Settle an Argument: Does it Leak?

Status
Not open for further replies.
Level 21
Joined
Mar 16, 2008
Messages
970
1618087930016.png


Player1Red = player variable that is defined at the start of the game
Player3Teal = player variable that is defined at the start of the game
RedMobaSpawnMid_Varx = point variable that is defined at the start of the game

One of the players when I host the map on bnet keeps saying this is leaking but I think he's just a troll. Can anyone else confirm this is not leaking?
 
Level 13
Joined
Feb 5, 2018
Messages
567
Generally speaking, things only leak after a reference to something is lost.

1) Good: Set Variable X = position of unit -- do stuff -- remove location
2) Bad: Set variable x = position of unit -- do stuff, set variable x = position of unit b -- do stuff

You can actually use a location variable multiple times if it remains the same, for example setting a location varible being in a region.

Also it looks like you have saved player 1 red into a variable, which is not needed. The default player groups never leak and cannot be destroyed.

Creating units into a constant region does not leak.
 
Level 21
Joined
Mar 16, 2008
Messages
970
I'm fairly certain this does not have any leaks but this troll player just keeps telling me it leaks. I've read that tutorial but thanks for linking, I'm going to read it again. Thanks for the replies everyone.
 
Status
Not open for further replies.
Top