Ejemplo n.º 1
0
 public static void stop() {
   ReferenceQueueDaemon.INSTANCE.stop();
   FinalizerDaemon.INSTANCE.stop();
   FinalizerWatchdogDaemon.INSTANCE.stop();
   HeapTrimmerDaemon.INSTANCE.stop();
   GCDaemon.INSTANCE.stop();
 }
Ejemplo n.º 2
0
 @FindBugsSuppressWarnings("FI_EXPLICIT_INVOCATION")
 private void doFinalize(FinalizerReference<?> reference) {
   FinalizerReference.remove(reference);
   Object object = reference.get();
   reference.clear();
   try {
     finalizingStartedNanos = System.nanoTime();
     finalizingObject = object;
     synchronized (FinalizerWatchdogDaemon.INSTANCE) {
       FinalizerWatchdogDaemon.INSTANCE.notify();
     }
     object.finalize();
   } catch (Throwable ex) {
     // The RI silently swallows these, but Android has always logged.
     System.logE("Uncaught exception thrown by finalizer", ex);
   } finally {
     finalizingObject = null;
   }
 }