@ Internal public void release ( ) { Object body = getBody ( ) . orElse ( null ) ; releaseIfNecessary ( body ) ; for ( ByteBufHolder byteBuf : receivedContent ) { releaseIfNecessary ( byteBuf ) ; } for ( ByteBufHolder byteBuf : receivedData . values ( ) ) { releaseIfNecessary ( byteBuf ) ; } if ( this . body != null && this . body instanceof ReferenceCounted ) { ReferenceCounted referenceCounted = ( ReferenceCounted ) this . body ; releaseIfNecessary ( referenceCounted ) ; } for ( Map . Entry < String , Object > attribute : attributes ) { Object value = attribute . getValue ( ) ; releaseIfNecessary ( value ) ; } }
Release and cleanup resources .