Package io.netty.util.internal
Class ObjectCleaner
- java.lang.Object
-
- io.netty.util.internal.ObjectCleaner
-
public final class ObjectCleaner extends java.lang.ObjectAllows a way to register someRunnablethat will executed once there are no references to anObjectanymore.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetLiveSetCount()static voidregister(java.lang.Object object, java.lang.Runnable cleanupTask)Register the givenObjectfor which theRunnablewill be executed once there are no references to the object anymore.
-
-
-
Method Detail
-
register
public static void register(java.lang.Object object, java.lang.Runnable cleanupTask)Register the givenObjectfor which theRunnablewill be executed once there are no references to the object anymore. This should only be used if there are no other ways to execute some cleanup once the Object is not reachable anymore because it is not a cheap way to handle the cleanup.
-
getLiveSetCount
public static int getLiveSetCount()
-
-