• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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