- java.lang.Object
-
- io.netty5.buffer.internal.CleanerDrop<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attach(T obj)
Called when the resource changes owner.void
drop(T obj)
Dispose of the resources in the givenResource
instance.Drop<T>
fork()
Branch the responsibility of dropping a resource.String
toString()
static <T extends Buffer>
Drop<T>wrap(Drop<T> drop, MemoryManager manager)
Wrap the given drop instance, and produce a new drop instance that will also call the delegate drop instance if it becomes cleanable.static <T extends Buffer>
Drop<T>wrapWithoutLeakDetection(Drop<T> drop, MemoryManager manager)
Wrap the given drop instance, and produce a new drop instance that will also call the delegate drop instance if it becomes cleanable.
-
-
-
Method Detail
-
wrap
public static <T extends Buffer> Drop<T> wrap(Drop<T> drop, MemoryManager manager)
Wrap the given drop instance, and produce a new drop instance that will also call the delegate drop instance if it becomes cleanable.
-
wrapWithoutLeakDetection
public static <T extends Buffer> Drop<T> wrapWithoutLeakDetection(Drop<T> drop, MemoryManager manager)
Wrap the given drop instance, and produce a new drop instance that will also call the delegate drop instance if it becomes cleanable.The produced drop will not report to the
LeakDetection
, but forks of the drop will. This is used by the const-buffer suppliers, which don't expose any way for them to be closed.
-
attach
public void attach(T obj)
Description copied from interface:Drop
Called when the resource changes owner.
-
drop
public void drop(T obj)
Description copied from interface:Drop
Dispose of the resources in the givenResource
instance.
-
fork
public Drop<T> fork()
Description copied from interface:Drop
Branch the responsibility of dropping a resource. This drop instance will remain associated with its current resource, while the returned drop instance must be attached to its new resource.
-
-