• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Another edition of: DOES - THIS - LEAK?

Status
Not open for further replies.
Level 8
Joined
Jan 16, 2008
Messages
156
Just wondering if any of this leaked.

Thanks.

  • Vengeance Selection
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Genn Greymane
    • Actions
      • Set Greymane = (Trained unit)
      • Trigger - Turn on Vengeance Learn <gen>
      • Trigger - Turn on Vengeance Reset <gen>
      • Trigger - Turn on Vengeance <gen>
      • Trigger - Turn off (This trigger)
  • Vengeance Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Vengeance (Dummy)
    • Actions
      • If ((Level of Vengeance (Dummy) for (Triggering unit)) Equal to 1) then do (Unit - Add Vengeance (Level 1) to (Triggering unit)) else do (Do nothing)
      • If ((Level of Vengeance (Dummy) for (Triggering unit)) Equal to 2) then do (Unit - Add Vengeance (Level 2) to (Triggering unit)) else do (Do nothing)
      • If ((Level of Vengeance (Dummy) for (Triggering unit)) Equal to 3) then do (Unit - Add Vengeance (Level 3) to (Triggering unit)) else do (Do nothing)
  • Vengeance
    • Events
      • Unit - A unit owned by Player 8 (Pink) Dies
    • Conditions
      • ((Killing unit) belongs to an enemy of Player 8 (Pink)) Equal to True
      • ((Dying unit) is A structure) Equal to False
      • ((Dying unit) is Mechanical) Equal to False
    • Actions
      • If ((Level of Vengeance (Level 1) for Greymane) Less than 17) then do (Unit - Increase level of Vengeance (Level 1) for Greymane) else do (Do nothing)
      • If ((Level of Vengeance (Level 2) for Greymane) Less than 17) then do (Unit - Increase level of Vengeance (Level 2) for Greymane) else do (Do nothing)
      • If ((Level of Vengeance (Level 3) for Greymane) Less than 17) then do (Unit - Increase level of Vengeance (Level 3) for Greymane) else do (Do nothing)
  • Vengeance Reset
    • Events
      • Unit - A unit owned by Player 8 (Pink) Finishes reviving
    • Conditions
      • (Unit-type of (Reviving Hero)) Equal to Genn Greymane
    • Actions
      • Unit - Set level of Vengeance (Level 1) for (Reviving Hero) to 1
      • Unit - Set level of Vengeance (Level 2) for (Reviving Hero) to 1
      • Unit - Set level of Vengeance (Level 3) for (Reviving Hero) to 1
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Or of course just read in exactly 2 minutes what are leaks and that basic types don't leak (well, beside strings, because warcraft sucks - but you can't do anything about them) and thus not open a thread every day for this stupid questions.

And I pointed that out to anybody that opens these threads.
 
Level 8
Joined
Jan 16, 2008
Messages
156
Or of course just read in exactly 2 minutes what are leaks and that basic types don't leak (well, beside strings, because warcraft sucks - but you can't do anything about them) and thus not open a thread every day for this stupid questions.

And I pointed that out to anybody that opens these threads.

First, the tool leak check didn't find some leaks in another trigger that people on here said the trigger had.

Second, I'm obviously new to leaks, but I have read over 2 hours of material across multiple sites on the issue, but many sites contradict each other.

Which one should I believe? Who knows. Trigger leaking doesn't seem to be an exact science, in fact it seems quite inexact, so being new to fixing the leaks in my map, It should be understandable why I'm second guessing myself, the things I read, and the tool leak checker.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Second, I'm obviously new to leaks, but I have read over 2 hours of material across multiple sites on the issue, but many sites contradict each other.

Which one should I believe? Who knows. Trigger leaking doesn't seem to be an exact science, in fact it seems quite inexact

Basically anything that extends Handle (which is all the types in warcraft expect the basic ones such as Integer, Real, Boolean, and Code) leaks.

As to pointers (such as Locations, Groups, Effects, and so on), they not only leak the reference they point to, also the object itself leaks and thus need to be destroyed using the appropriate function.

That's all there is to know...
 
Status
Not open for further replies.
Top