Class CleanupDetector


  • public class CleanupDetector
    extends Object
    • Constructor Detail

      • CleanupDetector

        public CleanupDetector()
    • Method Detail

      • onCleanup

        public static void onCleanup​(Object obj,
                                     Runnable r)
        The runnable gets executed after the object has been collected by the GC.
      • onCleanup

        public static void onCleanup​(CleanupDetector.WeakReferenceWithRunnable weakref)
        This version of the method can be used to provide more information in the heap dump by extending WeakReferenceWithRunnable.