Package ai.rapids.cudf
Class MemoryCleaner.Cleaner
java.lang.Object
ai.rapids.cudf.MemoryCleaner.Cleaner
- Direct Known Subclasses:
ColumnVector.OffHeapState
,HostColumnVectorCore.OffHeapState
,MemoryBuffer.MemoryBufferCleaner
- Enclosing class:
- MemoryCleaner
API that can be used to clean up the resources for a vector, even if there was a leak
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addRef()
final boolean
clean
(boolean logErrorIfNotClean) Clean up any resources not previously released.protected abstract boolean
cleanImpl
(boolean logErrorIfNotClean) Clean up any resources not previously released.final void
delRef()
abstract boolean
isClean()
Check if the underlying memory has been cleaned up or not.final boolean
Return true if a leak is expected for this object else false.final void
logRefCountDebug
(String message) void
-
Field Details
-
id
public final long id
-
-
Constructor Details
-
Cleaner
public Cleaner()
-
-
Method Details
-
addRef
public final void addRef() -
delRef
public final void delRef() -
logRefCountDebug
-
clean
public final boolean clean(boolean logErrorIfNotClean) Clean up any resources not previously released.- Parameters:
logErrorIfNotClean
- if true we should log a leak unless it is expected.- Returns:
- true if resources were cleaned up else false.
-
isLeakExpected
public final boolean isLeakExpected()Return true if a leak is expected for this object else false. -
cleanImpl
protected abstract boolean cleanImpl(boolean logErrorIfNotClean) Clean up any resources not previously released.- Parameters:
logErrorIfNotClean
- if true and there are resources to clean up a leak has happened so log it.- Returns:
- true if resources were cleaned up else false.
-
noWarnLeakExpected
public void noWarnLeakExpected() -
isClean
public abstract boolean isClean()Check if the underlying memory has been cleaned up or not.- Returns:
- true this is clean else false.
-