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

Leaks question

Status
Not open for further replies.
Level 10
Joined
Mar 17, 2012
Messages
579
Hi everyone! Qhick question. I'll show you this piece of trigger. Does it have any leaks?
  • Set Infernal_Storm_Picked_Point = (Position of Infernal_Storm_Picked)
  • Set Infernal_Storm_Movement = (Infernal_Storm_Picked_Point offset by (((Real((Level of Infernal Storm for Infernal_Storm_Caster[(Integer A)]))) x 0.40) + 2.00) towards Infernal_Storm_Angle[(Integer A)] degrees)
  • Custom script: call SetUnitX (udg_Infernal_Storm_Picked, GetLocationX (udg_Infernal_Storm_Movement))
  • Custom script: call SetUnitY (udg_Infernal_Storm_Picked, GetLocationY (udg_Infernal_Storm_Movement))
  • Custom script: call RemoveLocation(udg_Infernal_Storm_Picked_Point)
  • Custom script: call RemoveLocation(udg_Infernal_Storm_Movement)
  • Else - Actions
  • Custom script: call DestroyGroup(udg_Infernal_Storm_Group[GetForLoopIndexA()])
  • Else - Actions
Because I have read recently that there are some leaks using "Point WIth Polar Offset"...
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Point with polar offset uses a points and creates a new one. The point used and the point created need to be removed, that's why it is often mentioned as leaking in a special way.
But you did it correctly, no leaks.
 
Status
Not open for further replies.
Top