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

Removing Memory Leaks, Does Wiping over work?

Status
Not open for further replies.
Level 1
Joined
Jan 30, 2009
Messages
2
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
 
Status
Not open for further replies.
Top