Class MemoryCleaner.Cleaner

java.lang.Object
ai.rapids.cudf.MemoryCleaner.Cleaner
Direct Known Subclasses:
ColumnVector.OffHeapState, HostColumnVectorCore.OffHeapState, MemoryBuffer.MemoryBufferCleaner
Enclosing class:
MemoryCleaner

public abstract static class MemoryCleaner.Cleaner extends Object
API that can be used to clean up the resources for a vector, even if there was a leak
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
     
    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
     
    abstract boolean
    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
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public final void logRefCountDebug(String message)
    • 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.