my dog learned polymorphism
The moose likes Java in General and the fly likes Soft Reference class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Soft Reference class" Watch "Soft Reference class" New topic

Soft Reference class

Surya Bahadur
Ranch Hand

Joined: Sep 28, 2000
Posts: 88
Hi Guys
Can someone explain with a small example(if possible) about the SoftReference class introduced in java 2,i vaguely remember reading somewhere that it basically enables a programmer to mark an object as ready for garbage collection but at the same time allows the retrieval of the object until the garbage collector actually finishes it off.Can someone elaborate on this.???
Mark Herschberg

Joined: Dec 04, 2000
Posts: 6037
Check out
jQuery in Action, 3rd edition
subject: Soft Reference class
It's not a secret anymore!