WeakReference Class

Represents a weak reference, which references an object but still leaves it prone to garbage collection.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

[SerializableAttribute]
public class WeakReference

Remarks

The common language runtime (CLR) garbage collection mechanism reclaims inaccessible (unreachable) memory that is allocated to a particular object. An object becomes inaccessible if all references to it become invalid (for example, if you set those references to a null reference).

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

WeakReference Members
System Namespace