Runs the garbage collector. Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made a best effo
()
| 134 | * Runtime.getRuntime().gc() |
| 135 | */ |
| 136 | public static void gc() { |
| 137 | if(startedGc) { |
| 138 | forceGc = true; |
| 139 | gcShouldLoop = true; |
| 140 | } |
| 141 | startGCThread(); |
| 142 | synchronized(LOCK) { |
| 143 | LOCK.notify(); |
| 144 | } |
| 145 | try { |
| 146 | Thread.sleep(2); |
| 147 | } catch(InterruptedException er) {} |
| 148 | } |
| 149 | |
| 150 | private native static void gcLight(); |
| 151 | private native static void gcMarkSweep(); |
no test coverage detected