public void run() { // This thread runs forever
		while(!Thread.currentThread().isInterrupted()) {
			if(garbageCollectorFlag < 100) sleep(); //Puts the thread to sleep if the control flag's value is too low
			else {
				while(DrawGraph.getInstance().isMouseDown()) // Ensures that the garbage collector is not called if the user is dragging because it would cause the program to lag
					sleep();
				sleep(); // Waits another second
				
				if(!DrawGraph.getInstance().isMouseDown()) { // Checks to see if the mouse still is not clicked, if it is not, it is not likely that the mouse will be pressed while calling the garbage collector
					System.gc();
					garbageCollectorFlag = 0;
				}
			}
		}
	}