System::WeakReference Class Reference

Represents a weak reference, which references an object while still allowing that object to be deleted. More...

Public Member Functions

 WeakReference ()
 Default constructor. More...
 
 WeakReference (const SmartPtr< Object > &data)
 Initializes a new instance of the WeakReference class, referencing the specified object. More...
 
SmartPtr< Object > & get_Target ()
 Gets the object (the target) referenced by the current WeakReference object. More...
 
void set_Target (const SmartPtr< Object > &data)
 Sets the object (the target) referenced by the current WeakReference object. More...
 
bool get_IsAlive () const
 Gets an indication whether the object referenced by the current WeakReference object has been deleted. More...
 
void reset ()
 

Detailed Description

Represents a weak reference, which references an object while still allowing that object to be deleted.

Constructor & Destructor Documentation

◆ WeakReference() [1/2]

System::WeakReference::WeakReference ( )
inline

Default constructor.

◆ WeakReference() [2/2]

System::WeakReference::WeakReference ( const SmartPtr< Object > &  data)
inline

Initializes a new instance of the WeakReference class, referencing the specified object.

Member Function Documentation

◆ get_IsAlive()

bool System::WeakReference::get_IsAlive ( ) const
inline

Gets an indication whether the object referenced by the current WeakReference object has been deleted.

◆ get_Target()

SmartPtr<Object>& System::WeakReference::get_Target ( )
inline

Gets the object (the target) referenced by the current WeakReference object.

◆ reset()

void System::WeakReference::reset ( )
inline

◆ set_Target()

void System::WeakReference::set_Target ( const SmartPtr< Object > &  data)
inline

Sets the object (the target) referenced by the current WeakReference object.