protected void cleanUp(){
  if (isReleaseReferences()) {
    cleanUpOnAck();
    if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
      logger.logDebug("dialog cleanup : " + getDialogId());
    }
    if (eventListeners != null) {
      eventListeners.clear();
    }
    timerTaskLock=null;
    ackSem=null;
    contactHeader=null;
    eventHeader=null;
    firstTransactionId=null;
    firstTransactionMethod=null;
    lastResponseDialogId=null;
    lastResponseMethod=null;
    lastResponseTopMostVia=null;
    if (originalRequestRecordRouteHeaders != null) {
      originalRequestRecordRouteHeaders.clear();
      originalRequestRecordRouteHeaders=null;
      originalRequestRecordRouteHeadersString=null;
    }
    if (routeList != null) {
      routeList.clear();
      routeList=null;
    }
    responsesReceivedInForkingCase.clear();
  }
}

protected void cleanUp ( ) { if ( isReleaseReferences ( ) ) { cleanUpOnAck ( ) ; if ( logger . isLoggingEnabled ( LogWriter . TRACE_DEBUG ) ) { logger . logDebug ( "dialog cleanup : " + getDialogId ( ) ) ; } if ( eventListeners != null ) { eventListeners . clear ( ) ; } timerTaskLock = null ; ackSem = null ; contactHeader = null ; eventHeader = null ; firstTransactionId = null ; firstTransactionMethod = null ; lastResponseDialogId = null ; lastResponseMethod = null ; lastResponseTopMostVia = null ; if ( originalRequestRecordRouteHeaders != null ) { originalRequestRecordRouteHeaders . clear ( ) ; originalRequestRecordRouteHeaders = null ; originalRequestRecordRouteHeadersString = null ; } if ( routeList != null ) { routeList . clear ( ) ; routeList = null ; } responsesReceivedInForkingCase . clear ( ) ; } }
release references so the gc can clean up dialog state .
