Results 1 to 8 of 8

Thread: Memory Buildup?

  1. #1
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default Memory Buildup?

    I noticed when i ran simba over night, the Memory usage for it after 12hours had nearly tripled. I Dont remember this happening a couple months ago when i used it before.
    Is there anything i can do to Stop simba from building up so much memory? after A couple days it really effects how the script is running and how many i can run on 1 computer.

    -Thanks

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    What script were you using?

  3. #3
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Some TPA functions, and SMARTGraphics has mem leaks.

    Post the script.

  4. #4
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Simba Code:
    function FindHide: boolean;
    var
      i : Integer;
      TPA  : TPointArray;
      ATPA : T2DPointArray;
      MP   : TPoint;
      Box  : TBox;
    begin
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.62, 4.32);

      if FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15133427, MSX1, MSY1, MSX2, MSY2, 4) then
      begin
        ATPA := TPAtoATPAEx(TPA, 15, 15);
        SortATPASize(ATPA, True);
        for i := 0 to High(ATPA) do
        begin
          MP := MiddleTPA(ATPA[i]);
          Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
          MMouse(MP.X, MP.Y, 4, 4);
              Result := True;
              Break;
            end;
          end;
        end;



    Theres the script, It might be the TPA functions but idk what is causing the memory leak, any help would be appreciated.
    Last edited by Itankbots; 02-09-2013 at 09:54 AM.

  5. #5
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Replace the TPA functions with Wrappers

  6. #6
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Is this what you mean by wrappers? ive never used them before, just looked it up on the forums :c

    Simba Code:
    function FindHide: boolean;
    var
      i : Integer;
      TPA  : TPointArray;
      ATPA : T2DPointArray;
      MP   : TPoint;
      Box  : TBox;
      tmpCTS : Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.62, 4.32);

      if FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15133427, MSX1, MSY1, MSX2, MSY2, 4) then
      begin
      TPAtoATPAExWrap(TPA, 15, 15, ATPA);
        SortATPASize(ATPA, True);
        for i := 0 to High(ATPA) do
        begin
          MP := MiddleTPA(ATPA[i]);
          Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
          MMouse(MP.X, MP.Y, 4, 4);
              Result := True;
               ColorToleranceSpeed(tmpCTS);
                SetColorSpeed2Modifiers(0.2, 0.2);
              Break;
            end;
          end;
        end;

    Should that stop the memory buildup?

  7. #7
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Itankbots View Post
    Is this what you mean by wrappers? ive never used them before, just looked it up on the forums :c

    Should that stop the memory buildup?
    They work around the interpreter bug that causes array leaks, so using wrap functions Should stop most if not all memory leaking problems


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  8. #8
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    They work around the interpreter bug that causes array leaks, so using wrap functions Should stop most if not all memory leaking problems
    Alright, Thanks for the help guys! It seems to have worked ^.^

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •