System::WeakReference<> class

WeakReference<> class

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

class WeakReference<> : public System::WeakReference<System::Object>

Methods

MethodDescription
get_IsAlive() constGets an indication whether the object referenced by the current WeakReference object has been deleted.
get_Target() constGets the object (the target) referenced by the current WeakReference object.
set_Target(const SmartPtr<Object>&)Sets the object (the target) referenced by the current WeakReference object.
WeakReference()Default constructor.
WeakReference(std::nullptr_t)Constructor from nullptr.
WeakReference(const SmartPtr<Object>&)Initializes a new instance of the WeakReference class, referencing the specified object.
WeakReference(const SmartPtr<Object>&, bool)Initializes a new instance of the WeakReference class, referencing the specified object.

See Also