Title: [jdjlist] Re: Caching
java.lang.ref.SoftReference is like java.lang.ref.WeakReference which is used by WeakHashMap. The difference wasn't clear to me at first but I can find the explanation that help me if you desire.
From the javadocs: Soft references are most often used to implement memory-sensitive caches. Weak references are most often used to implement canonicalizing mappings.

James Stauffer

-----Original Message-----
From: Greg Nudelman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 3:58 PM
To: jdjlist
Subject: [jdjlist] Re: Caching

Thanks James -- this is becoming a very informative thread.  Is SoftReferences kind of like WeakHashMap? i.e. if the reference no longer exists, JVM has a low priority background thread that removes it from the hash and perfroms clean up.
 
Greg
 
 -----Original Message-----
From: James Stauffer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 1:39 PM
To: jdjlist
Subject: [jdjlist] Re: Caching

We use SoftReferences so the JVM manages it. I assume that it is close to LRU.
 

James Stauffer

 
---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk ---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

Reply via email to