• 🏆 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!

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,201
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