Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is your script using too much RAM? Here's the SOLUTION

Featured Replies

So I noticed one of my scripts was using stupid amounts of RAM, but at the cost of a little CPU usage, I solved it! I present to you... *drumroll*

 

THE ULTIMATE GARBAGE COLLECTOR

/*
 * @author: Valkyr
 *
 * This class is a replacement for the default JVM garbage collection.
 * The factory of GarbageCollectors is used to
 * create a constant flow of garbage collection. The ArrayList of
 * GarbageCollectors are like an army which get sent back in time to
 * destroy the garbage before it's able to harm.
 *
 */
 
import java.util.ArrayList;
import java.util.Iterator;
 
public class GarbageCollector {
 
        static ArrayList<GarbageCollector> collectors = new ArrayList<GarbageCollector>();
 
        public GarbageCollector() {
                new Thread(new Runnable() {
                        @Override
                        public void run() {
                                while (true) {
                                        GarbageCollector.collectors.add(new GarbageCollector()); // Creates a new GarbageCollector
                                        Iterator<GarbageCollector> it = collectors.iterator();
                                        while (it.hasNext()) {
                                                GarbageCollector gc = it.next(); // Assign's the GarbageCollector's role
                                                try {
                                                        Thread.sleep(-1); // Sends the GarbageCollector back in time
                                                } catch (InterruptedException e) {
                                                        e.printStackTrace();
                                                }
                                                ((GC) gc.getGet().getGC().get().getGet()).gc(); // Activate's the GarbageCollector's internal hardware and eradicates the garbage
                                        }
                                }
                        }
                }).start();
        }
 
        public GarbageCollector getGet() {
                return new GarbageCollector();
        }
 
        public GC getGC() {
                return new GC();
        }
 
        public static class GC extends GarbageCollector {
               
                /*
                 * The GC. Core of every GarbageCollector. It is vital to fight and defend against the garbage.
                 */
 
                public GC getGet() {
                        return new GC();
                }
 
                public GarbageCollector get() {
                        return new GarbageCollector();
                }
 
                public void gc() {
                        Runtime.getRuntime().gc(); // Destroys the garbage.
                }
        }
}

Note: Don't actually use this, I posted it as a joke because I'm bored.

Edited by Valkyr

 

Note: Don't actually use this, I posted it as a joke because I'm bored.

then why is it under the snippet section lol

  • Author

then why is it under the snippet section lol

 

Its an old snippet I found lying around from when I was trolling rune-server :P

I guess a mod could move it to spam/off-topic

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.