code: public void destroy() {
          if (sslEngine == null) {
              return;
          }
  
          // Close inbound and flush all remaining data if available.
          try {
              sslEngine.closeInbound();
          } catch (SSLException e) {
              LOGGER.debug(
                      "Unexpected exception from SSLEngine.closeInbound().", e);
          }
  
  
          if (outNetBuffer != null) {
              outNetBuffer.capacity(sslEngine.getSession().getPacketBufferSize());
          } else {
              createOutNetBuffer(0);
          }
          try {
              do {
                  outNetBuffer.clear();
              } while (sslEngine.wrap(emptyBuffer.buf(), outNetBuffer.buf()).bytesProduced() > 0);
          } catch (SSLException e) {
              // Ignore.
          } finally {
              destroyOutNetBuffer();
          }
  
          sslEngine.closeOutbound();
          sslEngine = null;
  
          preHandshakeEventQueue.clear();
      }
docs: Release allocated buffers.