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