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 -05:00

回到话题: Jabber's java questions...

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论