commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lamy" <>
Subject RE : Log4j String buffer memory Leak.
Date Wed, 07 Jun 2006 15:14:30 GMT
Simple question 
You made
logger.debug(connectionID + "-" + message);


If (logger.isDebugEnabled()) 
logger.debug(connectionID + "-" + message);

If using first, you create some String instance for nothing.


-----Message d'origine-----
De : Naveen [] 
Envoyé : mercredi 7 juin 2006 16:45
À :
Objet : Log4j String buffer memory Leak.

Hello all,
  Iam not sure if there is really amemory leak in Log4jLogger. We use
Mercury diagnosis tool to find the memory leak and the reports show all
the string buffers being held up at 
  1. org.apache.log4j.Logger.debug 
  this is one of the call we make
  logger.debug(connectionID + "-" + message);
  logger is an instance of Log4j.Logger and connectionID,message are
  i know appending strings will internally create StrinBuffers but our
memory reports show string buffers are never cleared which are areated
during that call.
  any help is highly appreciated.

  It only takes a moment to be kind, but the results can be

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

This e-mail, any attachments and the information contained therein ("this message") are confidential
and intended solely for the use of the addressee(s). If you have received this message in
error please send it back to the sender and delete it. Unauthorized publication, use, dissemination
or disclosure of this message, either in whole or in part is strictly prohibited.
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues
dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement
à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par
erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication,
totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées
de ce message, sont interdites.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message