Initializes a new instance of the WeakReference class with the specified object.
[Visual Basic] Overloads Public Sub New( _ ByVal target As Object _ ) [C#] public WeakReference( object target ); [C++] public: WeakReference( Object* target ); [JScript] public function WeakReference( target : Object );
Exception Type | Condition |
---|---|
ArgumentException | If the target object is null. |
This WeakReference constructor creates a short weak reference to the specified object.
A short weak reference is tracked only until finalization (that is, trackResurrection is false). The reference will refer to the target until the first time it is detected to be unreachable by the runtime.
WeakReference Class | WeakReference Members | System Namespace | WeakReference Constructor Overload List | Object