java.lang.ref.WeekReference represents a reference which will be held for one week before being finalized by the garbage collector...

ely (Ely)
Just kidding with jabber's typo.
java.lang.ref package contains classes coping with the garbage collector.
java.lang.ref.Reference refers some types of indirect reference to a referent.
the subclasses of java.lang.ref.Reference interact with the garbage collector in different ways.
java.lang.ref.WeakReference is one of the three subclasses, it does NOT prevent that refent object from being finalized by the garbage collector. the garbage collector will clear the WeakreRerence if the garbage collector finds no more direct references..

WeakReference is used by java.util.WeakHashMap. WeakHashMap is useful if u want to attach additional information to an object but don't need it beprotected.
2001-2-5 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: Jabber's java questions...

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论