public void delete ( ) { // acquire lock for minimum time final long swigPtr = mSwigCPtr . getAndSet ( 0 ) ; if ( swigPtr != 0 ) { if ( mJavaRefCount . decrementAndGet ( ) == 0 ) { // log.debug("deleting: {}; {}", this, mSwigCPtr); FerryJNI . RefCounted_release ( swigPtr , null ) ; } // Free the memory manager we use mMemAllocator = null ; } }
Explicitly deletes the underlying native storage used by the object this object references . The underlying native object is now no long valid and attempts to use it could cause unspecified behavior .