public void releaseBuffers ( ) { // release buffers is desired if ( payloadBuffers != null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "release payload buffers. number to release is: " + payloadCountOfBuffers ) ; } // if the payload buffers have been set into here, then release those for ( int i = 0 ; i < payloadCountOfBuffers ; i ++ ) { payloadBuffers [ i ] . release ( ) ; } // avoid double releasing by resetting these objects and variables payloadBuffers = null ; payloadCountOfBuffers = 0 ; } else { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "release buffers from frame list. number to release is: " + countOfIOFrames ) ; } // payload buffers haven't been set into here yet, so release buffers on each frame processor if ( countOfIOFrames > 0 ) { for ( int i = 0 ; i < countOfIOFrames ; i ++ ) { fpList [ i ] . releaseBuffers ( ) ; } } else { frameProcessor . releaseBuffers ( ) ; } } }
This is never called except in an exception case . frame buffers should be cleaned up when reset is called on the FrameReadProcessor