1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
<Type Name="WeakReference" FullName="System.WeakReference">
<TypeSignature Maintainer="auto" Language="C#" Value="public class WeakReference : System.Runtime.Serialization.ISerializable" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Docs>
<summary>A weak reference holds a reference to another object but does not prevent the object from being garbage collected.</summary>
<remarks>
<para>Garbage collection is the automatic, background process where unused objects are deallocated from memory. Normally, objects that can still be accessed by the program will not be garbage collected. The WeakReference object provides an exception. The reference from a WeakReference object to another object, the target, is not considered when determining whether that object is ready for garbage collection.</para>
<para>That is, an object is elligible for garbage collection when there are no "strong" references to the object.</para>
<para>When the target of a WeakReference is garbage collected, the Target property of the WeakReference is reset to <see langword="null" /> and the target is no longer accessible to the program.</para>
<para>If the WeakReference is tracking an object's ressurection, the object will still be accessible from the Target property after the object's Finalize method has been called but before the object is cleared from memory.</para>
</remarks>
</Docs>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
</Interface>
</Interfaces>
<Members>
<Member MemberName="GetObjectData">
<MemberSignature Language="C#" Value="public virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
</Parameters>
<Docs>
<summary>This method is used for serialization.</summary>
<param name="info">No information available.</param>
<param name="context">No information available.</param>
<remarks>None.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public WeakReference (object target);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="target" Type="System.Object" />
</Parameters>
<Docs>
<summary>Creates a new WeakReference referencing an object.</summary>
<param name="target">The target object object.</param>
<remarks>None.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public WeakReference (object target, bool trackResurrection);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="target" Type="System.Object" />
<Parameter Name="trackResurrection" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>Creates a new WeakReference referencing an object, and optionally tracking the ressurection of the object.</summary>
<param name="target">The target object.</param>
<param name="trackResurrection">Whether to retain the reference to the object after the object's finalizer has been called but before the object has been removed from memory.</param>
<remarks>Accessing an object post-finalization should be done with care.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected WeakReference (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
</Parameters>
<Docs>
<summary>This constructor is for serialization.</summary>
<param name="info">No information available.</param>
<param name="context">No information available.</param>
<remarks>None.</remarks>
</Docs>
</Member>
<Member MemberName="IsAlive">
<MemberSignature Language="C#" Value="public virtual bool IsAlive { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether the target has been garbage collected.</summary>
<value>True if the target has been garbage collected.</value>
<remarks>None.</remarks>
</Docs>
</Member>
<Member MemberName="TrackResurrection">
<MemberSignature Language="C#" Value="public virtual bool TrackResurrection { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether this WeakReference is tracking the object's resurrection.</summary>
<value>True if the WeakReference is tracking the target object's ressurection.</value>
<remarks>None.</remarks>
</Docs>
</Member>
<Member MemberName="Target">
<MemberSignature Language="C#" Value="public virtual object Target { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
</Parameters>
<Docs>
<summary>Gets or sets the target object.</summary>
<value>The target object.</value>
<remarks>The target is potentially elligible for garbage collection although it may be reachable through this property.</remarks>
</Docs>
</Member>
</Members>
</Type>
|