> From: Rolf Zelder [mailto:[EMAIL PROTECTED]
> Subject: Memory leak
> 
> I don't want to believe that this little web app is leaking memory.
> Therefore I must do something wrong how I monitor the memory usage.

I suspect the real issue is understanding how the JVM uses memory.  Object 
allocation can use however much memory you have specified for this java 
execution.  It may garbage collect prior to reaching the maximum, but the JVM 
is under no particular obligation to do so.  Once the maximum is reached, 
garbage collection must occur, which will release the space occupied by 
unreachable objects back to the heap.

Note that pure Java applications can't have "memory leaks" in the traditional 
sense, since the programmer can't forget to include calls to the free() 
interface - there isn't one.  What does happen with Java is forgetting to null 
out references to objects that are no longer needed, thereby preventing the 
garbage collector from returning such objects' space to the heap.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to