August 06, 2002
Weak, Soft and Phantom references in Java

Reference Objects and Garbage Collection By Monica Pawlan.

See also O'Reilly on the WeakHashMap class, and an implementation of SoftHashMap, which is missing from the Sun library.

Weak references exist in Python, but unfortunately soft references do not. Which is a shame, 'cos they are very useful for eliminating memory leaks from data caches.

Posted to Java by Simon Brunning at August 06, 2002 01:51 PM
Post a comment

Email Address:



Remember info?