• 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] Move to "positions of Unit"

Status
Not open for further replies.
Level 2
Joined
Apr 6, 2007
Messages
7
Hi

does the "move unit to position of unit" action cause leak (positions of units)
and if it does with what script can i remove the positions?
I tried "call RemoveLocation( udg_TempPoint[GetForLoopIndexA()]"
TempPoint is an Array with the positions of the units inside. But i alway get compilation error "name required"

would be nice if so could help me, thanks in advance :)
 
Level 7
Joined
Dec 26, 2006
Messages
303
What kind of leak you mean?

I also do
"move unit to position of unit offset by x,y"
or
"move unit to position of unit offset by z from facing point of unit"

what's wrong with these trigger? Is it not enough devastating for you?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
I may one day but currently there are a lot of them already.

I would like to remind everyone that this is the "Triggers (GUI)" section so please refraim for talking in jass unless you clearly say "insert this in the custom script action" or anything along thoes lines since pure jass belongs in the "Triggers (JASS)" section.

A location (point in GUI) will leak unless your remove it since a location is a piece of infomation with a XYZ cordinates tied together under one heading. Same goes for Groups except they are a list of units tied together under one heading. In GUI if you fail to destroy/remove a group/location and you overwright the variable with it, it has leaked since no matter what you do you can not retreive it again to remove it.
 
Level 4
Joined
Sep 20, 2005
Messages
72
*coughcough*:emote_innocent: :emote_innocent: :emote_innocent: *coughcough* You saw nothing here....:emote_innocent: :emote_innocent:

and just to prove that, i will do an experiment. 30 locations per sec until leak count = 20k, ran three times: one with no use of variables, one with locations stored in global var before calling for them. last one with global var + removelocation (20k potential leaks should be more than enough to able to make a significant impact)

Edit: Yea I just proved myself wrong :emote_mad: COMPLETELY forget what i said if you actually read my post. :emote_innocent:

(just for the info after running 50k of location leaks
- increased mem usage of normal leak ~ 18k,
- global leak ~ 18k (lol its identical, ill shut up now.)
- RemoveLocation ~ 3k

*note: i felt no leak symptoms cuz im running on 2gb of ram so increased mem usage was my method of measurement. I was planning on measuring "black screen of death" duration but to my suprise got none =O

But now i dont get it. Why did changing from leak to temp global use fix my leak problem? =?=? I assure you that my map once had massive leaking. Now i switched to temp globals no apparent leak symptoms can be seen...(that was both back when i was on 1gb of ram)
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Vexorian said that local handles leak if you do not null them at the end of the function. Globals do not make that type of leak since they always exist. Globals can leak if you give them an object and then give them a new object without destroying the last object but then it is not really the global leaking but an object (handle) leaking.
 
Status
Not open for further replies.
Top