WeakReference.WeakReference(Object, Boolean) Constructor
Assembly: mscorlib (in mscorlib.dll)
An object to track.
Indicates when to stop tracking the object. If true, the object is tracked after finalization; if false, the object is only tracked until finalization.
If trackResurrection is false, a short weak reference is created. If trackResurrection is true, a long weak reference is created.
Windows Mobile 2003 for Pocket PC, Windows Mobile 2003 for Smartphone, Windows CE Platform Note: Short weak references are supported on the .NET Compact Framework, but long weak references are not supported. When you use this method, you must set the trackResurrection parameter to false.
The following example creates a cache of data objects with short weak references. This example is part of a larger example provided for the WeakReference class.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.