Represents a typed weak reference, which references an object while still allowing that object to be reclaimed by garbage collection.
generic <typename T> where T : classpublic ref class WeakReference sealed : System::Runtime::Serialization::ISerializable
[System.Serializable] public sealed class WeakReference<T> : System.Runtime.Serialization.ISerializable where T : class
type WeakReference<'T (requires 'T : null)> = class interface ISerializable
Public NotInheritable Class WeakReference(Of T) Implements ISerializable
The type of the object referenced.
A weak reference enables the garbage collector to collect an object while still allowing an application to access the object. If you need the object, you can obtain a strong reference to it and prevent it from being collected.
Initializes a new instance of the WeakReference<T> class that references the specified object.
Initializes a new instance of the WeakReference<T> class that references the specified object and uses the specified resurrection tracking.
Determines whether the specified object is equal to the current object.(Inherited from Object)
Discards the reference to the target that is represented by the current WeakReference<T> object.
Serves as the default hash function.(Inherited from Object)
Gets the Type of the current instance.(Inherited from Object)
Creates a shallow copy of the current Object.(Inherited from Object)
Sets the target object that is referenced by this WeakReference<T> object.
Returns a string that represents the current object.(Inherited from Object)
Tries to retrieve the target object that is referenced by the current WeakReference<T> object.