WeakReference<T> Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Represents a typed weak reference, which references an object while still allowing that object to be reclaimed by garbage collection.
Assembly: mscorlib (in mscorlib.dll)
The WeakReference<T> type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | WeakReference<T>(T) | Initializes a new instance of the WeakReference<T> class that references the specified object. |
![]() | WeakReference<T>(T, Boolean) | Initializes a new instance of the WeakReference<T> class that references the specified object and uses the specified resurrection tracking. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | SetTarget | Sets the target object that is referenced by this WeakReference<T> object. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | TryGetTarget | Tries to retrieve the target object that is referenced by the current WeakReference<T> object. |
Show:

