Class NativeResourceHolder


  • public abstract class NativeResourceHolder
    extends java.lang.Object
    Abstract instance of a class which holds native resources that must be freed.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkNotReleased()
      Assert that the native resources have not been freed.
      void close()
      Free up native resources of the decoder.
      protected void finalize()  
      protected abstract void freeResources()
      Free the native resources.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NativeResourceHolder

        public NativeResourceHolder()
    • Method Detail

      • checkNotReleased

        protected void checkNotReleased()
        Assert that the native resources have not been freed.
      • close

        public void close()
        Free up native resources of the decoder. Using other methods after this will throw IllegalStateException.
      • freeResources

        protected abstract void freeResources()
        Free the native resources.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable