@ Override public void destroyWorkspace ( boolean extended ) { if ( workspace . getHostPointer ( ) != null && workspace . getHostPointer ( ) . getOriginalPointer ( ) != null && workspace . getHostPointer ( ) . getOriginalPointer ( ) instanceof BytePointer ) workspace . getHostPointer ( ) . getOriginalPointer ( ) . deallocate ( ) ; workspace . setHostPointer ( null ) ; currentSize . set ( 0 ) ; reset ( ) ; if ( extended ) { clearExternalAllocations ( ) ; } //cycleAllocations.set(0); //maxCycle.set(0); }
This method basically deallocates workspace memory