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

Only a simple LEAK question

Status
Not open for further replies.
Level 10
Joined
May 21, 2006
Messages
323
some answers I couldnt find in the leak section

1. Does a loop trigger leak even if it does nothing?
2. Does it leak when for example it goes from 1-100 has a Condition check but the check is false everytime.

3. When I trigger example: Unit cast shockwave at Position of Last created unit

Does the "Position of Last Created unit" leak although I didnt call it as a point. Or does I have to call Destry udg... Position of Last Created Unit ???

Thanks for answers
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Yes, that also leaks.

Basically anything in the point "function list" will leak.

The other important leak you need to worry about is the Unit Group leak - that's whenever you use e.g. (last created unit group) or (units in region). To fix this one is simpler - you just need to add a custom script before the unit group action:
  • Custom script: set bj_wantDestroyGroup = true
PS: Don't double-post :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
1. Does a loop trigger leak even if it does nothing?
Leaks only occur if you create something and forget to remove it when it is no longer useful. You are not creating anything with flow control.

2. Again, nothing is created so no leak can occur.

3. The function call itself will not leak. However the location you pass it can if you forget to remove it.

Does the "Position of Last Created unit" leak although I didnt call it as a point. Or does I have to call Destry udg... Position of Last Created Unit ???
In GUI this will leak as you create a location and never remove it.
 
Status
Not open for further replies.
Top