• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Removing Memory Leaks, Does Wiping over work?

Status
Not open for further replies.

PossiblyMatt

P

PossiblyMatt

I have read the basic tutorial on memory leaks and am now in the process of cleaning them up from my GUI triggers. What I would like to know is do i have to destroy the group/point reference after each use or can I overwrite it. i.e. If I were to create a line of units could I do

SetVariable: temppoint = position of triggering unit offset 100 towards 90.0 degrees
Unit: Create 1 footman at temppoint
SetVariable: temppoint = position of triggering unit offset 200 towards 90.0 degrees
Unit: Create 1 footman at temppoint
etc.
Custom Script: RemoveLocation( udg_temppoint)

Or should I remove the point each time

SetVariable: temppoint = position of triggering unit offset 100 towards 90.0 degrees
Unit: Create 1 footman at temppoint
Custom Script: RemoveLocation( udg_temppoint)
SetVariable: temppoint = position of triggering unit offset 200 towards 90.0 degrees
Unit: Create 1 footman at temppoint
Custom Script: RemoveLocation( udg_temppoint)
etc.

Any help will be appreciated.

PossiblyMatt
 
Thanks for the help everyone.
Now just to redo nearly every trigger in my map :P
 
Status
Not open for further replies.
Back
Top