1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
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. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,293
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    No need to set TempRegion to null (No region) unless it's a local variable.
     
  2. praudmur

    praudmur

    Joined:
    May 26, 2012
    Messages:
    73
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Just how much "leaks" is enough to slow down the game? I did a revision in my scripts, removing all "Center of region" functions. But it turns cutscene-making proccess into a chore(units get moved to the Center of region, I order units to go to the center of region ects..). I'm wondering if I should remove leaks in cutscenes..
    Is there an 'approximate" number of "Center of region" leaks that should happen before game starts lagging because of it?
     
  3. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,532
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    Single leaks are mostly not important, if something only fires once. Loops/periodic stuff is important.
    If that source is still correct, that a location leaks 0.361 KB, then it takes for example 10'000 locations to occupy 1/3 GB. It might be handled, but it's already a concern. Warcraft takes RAM itself, all your other objects, terrain etc needs RAM, too... and I think it's capped to 2 or 3 GB in total.
     
    Last edited: Jun 7, 2020
  4. praudmur

    praudmur

    Joined:
    May 26, 2012
    Messages:
    73
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Good. Thanks.
    Just wondering. Is this something that can't be fixed by Blizzard over these years? The solutions seems as simple as adding a one line of code.
     
  5. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    8,384
    Resources:
    2
    Models:
    1
    Maps:
    1
    Resources:
    2
    Seems like it... Rarely is.
     
  6. [db]east

    [db]east

    Joined:
    Feb 27, 2019
    Messages:
    127
    Resources:
    0
    Resources:
    0
    Will "set bj_wantDestroyGroup = true" clean the leak when setting this unit variable?

    • Custom script: set bj_wantDestroyGroup = true
    • Set VariableSet Nearby_Target_Kenneth = (Random unit from (Units within 3200.00 of Loc[7] matching (((Unit-type of (Matching unit)) Equal to Scared Pig) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is invulnerable) Equal to False)