> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: java.lang.OutOfMemoryError: Java heap space
> 
> There are even techniques that will allow your session objects to
> expire when memory gets tight (which is super cool IMO).

To put a name on the above technique, read up on using SoftReference objects to 
track entries in your cache(s).  These will allow GC to discard objects not in 
immediate use when the heap is full.
http://www.ibm.com/developerworks/java/library/j-jtp01246.html
http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html

 - 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.

Reply via email to