2005/5/9

     
 

class WeakReference

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::ref::WeakReference Class Reference

#include <WeakReference.h>

Inheritance diagram for acdk::lang::ref::WeakReference:

acdk::lang::ref::Reference acdk::lang::Object acdk::lang::ref::NotifyObjectEventListener acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::util::WeakHashMapKey List of all members.

Detailed Description

Similar or equal to the Java API.

if no other Reference hold this object : The referenced Object will be destroyed or a ReferenceQueue is given. If a ReferenceQueue is given, the the queue owns the reference. The reference can be cleared by calling poll() or remove(). If the ReferenceQueue itself will be destroyed all References held by this ReferenceQueue will also be destroyed. WeakReferences, which are hold by the ReferenceQueue still are reachable through the WeakReferences instance.

Author:
Roger Rene Kommer
Version:
Revision
1.11
Date:
Date
2005/02/05 10:44:59
See also:
NotifyRepository


Public Member Functions

 WeakReference (IN(RObject) ref, IN(RReferenceQueue) queue=Nil)
 ~WeakReference ()
virtual RObject get ()
virtual bool notifyBeforeDestruction (Object *obj)
 called if RefCount == 0.


Constructor & Destructor Documentation

acdk::lang::ref::WeakReference::WeakReference IN(RObject ref,
IN(RReferenceQueue queue = Nil
 

acdk::lang::ref::WeakReference::~WeakReference  ) 
 


Member Function Documentation

virtual RObject acdk::lang::ref::WeakReference::get  )  [virtual]
 

Reimplemented from acdk::lang::ref::Reference.

virtual bool acdk::lang::ref::WeakReference::notifyBeforeDestruction Object obj  )  [virtual]
 

called if RefCount == 0.

Returns:
false if object should not be destroyd

Reimplemented from acdk::lang::ref::Reference.