Soft references

Soft references are Java object classes that are to be treated specially by the garbage collector. Besides from standard "strong" references, there are soft references, weak references, and phantom references, all of which provide different levels of reachability than a standard reference. Soft and weak references are allowed to be garbage collected if memory is scarce, and are typically referenced by a wrapper object. A wrapper object is normally a Reference instance. Thus, soft and weak references may automatically be removed from a wrapper object by the GC if no other references exist. Phantom references, never reachable from their wrapper objects, can be used to implement finalization with safer semantics.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.210.91