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

[Trigger] Leak in trigger (can't make out where it is)

Status
Not open for further replies.
Level 3
Joined
Jan 4, 2010
Messages
14
Hi.

I have have a leak in my map and found that the leak comes from this trigger. (Did a few tests while watching Windows Task Manager, and I'm definate that this trigger is causing a small leak)

My map is a tower defense map. Basically what this trigger does it that it clears dummy towers created by another trigger (the main anti-juggle trigger), if there are no more creeps in the player's zone.

I tried to follow memory leak tutorials but I don't find anything else that might leak that is mentioned in the tutorials. I plugged as many leaks as I could already, but the problem is that it still leaks (around 4 KB per few seconds).

The screenshot is just part of the trigger (of 2 player zones). The rest of the trigger is just basically a copy and paste of the first part.

2rypxs5.jpg


Would appreciate if you could spot the leak. Thanks.
 
Last edited:
Level 3
Joined
Jan 4, 2010
Messages
14
No more leaks now, but
I didn't use that because I have some experiences that if I use a destroy variable custom script the variable might become unusable (cannot add new data to it).

It happened again.

I destroyed the unit group variable at the start of a trigger, then tried to use "Add Unit to Group" to add a unit to it. But it doesn't work. Any clues?

21n1h1g.jpg
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
No more leaks now, but
I didn't use that because I have some experiences that if I use a destroy variable custom script the variable might become unusable (cannot add new data to it).

It happened again.

I destroyed the unit group variable at the start of a trigger, then tried to use "Add Unit to Group" to add a unit to it. But it doesn't work. Any clues?

21n1h1g.jpg

SirNikolas got right, u destroyed the group and after u destroyed u want add unit to non existing group

example if u made every action with that units and group dont need anymore then u can destroy or before u use pick all unit to your group
maybe u thought u want clear the previous units from group but for that use
  • Unit Group - Remove all units from (your unit group)
 
Status
Not open for further replies.
Top