• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] How many times can a handle leak?

Status
Not open for further replies.
Level 10
Joined
Jan 28, 2009
Messages
442
If I want to use a function like Center of PlayableMapArea, which I understand leaks. If I want to use it several times, I don't have to destroy it, right? Or is Center of PlayableMapArea actually a new handle each time I refer to it?

Then what if I Pick all units in EmoRegion and do actions. When I refer to that handle later, some of the units might be dead or gone, and new units might be in the region now. So all units in EmoRegion is a different group now only if the contents have changed, or simply everytime referred to?
 
  • -------- every time it is called, it create a new location. so do this --------
  • set temploc = Center of (Playable map area)
  • -------- add your own stuff here, using the variable temploc --------
  • Custom script - call RemoveLocation(udg_temploc)
 
Okay, so dansaDisco is talking about setting a variable to the location, not calling the location many times and then cleaning the trash, but cleaning up everytime you mess a bit. Or at least, making sure you have a variable set to it until it is destroyed. Think I get it now. Thanks. And thanks for a really speedy response!
 
Status
Not open for further replies.
Back
Top