Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Things That Leak

Discussion in 'Triggers & Scripts' started by Ralle, Jun 10, 2007.

  1. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,846
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    why?
     
  2. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,793
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
  3. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    GetUnitsOfTypeIdAll
    should be avoided, it leaves two local groups unnulled. It is ok to use
    bj_wantDestroyGroup
    with Unit group - Pick all units in range matching... even though that leaks also, only less.
     
  4. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,376
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    If they are using mostly GUI, the handle ID leaks are hardly bad. It's when you use offset -0x100000 that nulling handle ID's becomes immensely important.
     
  5. Floating texts also leak but I understand there is a 100 limit on it so I guess its more of a performance issue rather than a possibility to crash.

    Also INIT triggers are called once on start of the map for keeping of vars, creation of stuff and they are never called again (except maybe at end of game in some cases) so this is not a OMG LEAK CLEAN IT UP!
     
  6. WaterKnight

    WaterKnight

    Joined:
    Aug 18, 2009
    Messages:
    4,035
    Resources:
    5
    Maps:
    1
    Tutorials:
    4
    Resources:
    5
    Static leaks often do hardly matter.
     
    Last edited: Oct 18, 2013
  7. plumsy460

    plumsy460

    Joined:
    Oct 2, 2013
    Messages:
    273
    Resources:
    0
    Resources:
    0
    What about:
    Var = Point with offset

    Do you have to define that "point" with another var before doing this?
     
  8. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,793
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Yes.
     
  9. Ralle

    Ralle

    Owner

    Joined:
    Oct 6, 2004
    Messages:
    11,462
    Resources:
    21
    Tools:
    2
    Maps:
    5
    Tutorials:
    14
    Resources:
    21
  10. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,413
    Resources:
    1
    JASS:
    1
    Resources:
    1
    No, you guys should avoid GUI and learn jass :p
     
  11. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    8,201
    Resources:
    31
    Packs:
    1
    Maps:
    9
    Spells:
    18
    Tutorials:
    3
    Resources:
    31
    Ralle, better add that tool to the first page.
     
  12. Ralle

    Ralle

    Owner

    Joined:
    Oct 6, 2004
    Messages:
    11,462
    Resources:
    21
    Tools:
    2
    Maps:
    5
    Tutorials:
    14
    Resources:
    21
    Daffy you are right. I should.
     
  13. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,793
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    or maybe a sticky thread?
     
  14. Ralle

    Ralle

    Owner

    Joined:
    Oct 6, 2004
    Messages:
    11,462
    Resources:
    21
    Tools:
    2
    Maps:
    5
    Tutorials:
    14
    Resources:
    21
    You make one, I'll poke at it with my stick!
     
  15. DelmarVladek

    DelmarVladek

    Joined:
    Jul 28, 2012
    Messages:
    36
    Resources:
    0
    Resources:
    0
    Wow. I didn't know leaks were this intense, and this diverse.
    ._.
    Good to know this stuff.
     
  16. plumsy460

    plumsy460

    Joined:
    Oct 2, 2013
    Messages:
    273
    Resources:
    0
    Resources:
    0
    I noticed that when you use a power-up item (tome of power for instance) it leaves a small yellow dot on the ground from the flashy effects. This dot does not vanish.
    Is this considered a leak?

    I considered changing the item model into a zone indicator. But wouldn't the effect still leak even though you cant see it?
     
  17. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,376
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
  18. plumsy460

    plumsy460

    Joined:
    Oct 2, 2013
    Messages:
    273
    Resources:
    0
    Resources:
    0
    Perfect! Thank you very much!
     
  19. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    8,419
    Resources:
    2
    Models:
    1
    Maps:
    1
    Resources:
    2
    So why, on the first page, does it mention "Pick all units of unit-type X" as a "blacklisted" function?
     
  20. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,376
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    It creates a group that leaks a handle. It's a lesser leak, but still something better to avoid.