Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Computor's Cannonball Smither


    Computor

    Recommended Posts

    The client doesn't run at 300+MB with no script.

     

    Your memory usage goes up to 1GB+ because you have your memory settings (the launcher) set that high. If you lower it, it will garbage collect more often and bring the memory back down.

     

    But I'd guess your memory is jacked because you have essentially two script threads running. Which is gross, by the way. Your anti thread handles banking. ._.

    Link to comment
    Share on other sites


    List<GameObject> objects = s.getGameObjects().getObjects();
    List<GameObject> filtered = new ArrayList<>();
    // FILTER LOOP
    // SET "OBJECTS" TO NULL
    GameObject chosen = filtered.get(randInt(0,filtered.size()-1));
    // SET "FILTERED" TO NULL

     

    Link to comment
    Share on other sites

    List<GameObject> objects = s.getGameObjects().getObjects();
    List<GameObject> filtered = new ArrayList<>();
    // FILTER LOOP
    // SET "OBJECTS" TO NULL
    GameObject chosen = filtered.get(randInt(0,filtered.size()-1));
    // SET "FILTERED" TO NULL

    Why would he explicitly set a null reference when once the call stack unwinds it'll lose the reference anyway....

    Link to comment
    Share on other sites

    Why would he explicitly set a null reference when once the call stack unwinds it'll lose the reference anyway....

     

    To make the lists eligible for garbage collection (assuming they are the ones clogging up the memory)(?)

    I don't know much about the JVM or garbage collection, if I'm wrong please tell me :P

    Link to comment
    Share on other sites

    To make the lists eligible for garbage collection (assuming they are the ones clogging up the memory)(?)

    I don't know much about the JVM or garbage collection, if I'm wrong please tell me :P

    All a reference variable holds is a reference to the objects data out on the heap, not the actual object itself. The GC works by examining all current object references and, at the end of the reference collection, deems any objects data which was not examined as "garbage". To visually represent this:

     

    gc-roots-with-memory-leak.png

     

    As the variable goes out of scope once the method returns and both objects have their references removed they are then eligible for garbage collection. Note that they are eligible, the collector will decide in it's own time when to do a sweep.

     

    For more info: http://javabook.compuware.com/content/memory/how-garbage-collection-works.aspx

    Link to comment
    Share on other sites

    • 6 months later...

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.