NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

GCHandle Members

Public:

Properties

IsAllocated This method can be used to determine if the handle is still allocated. This method is particularly useful when using weak handles GCHandleType- Weak) since it provides a way of determining if the GC handle is still available. When the GC attempts to collect the object, the latter could still be resurrected in the finalizer. In this case, the handle will not be allocated (this is lost when the GC attempts to collect the object) although the Target object is valid.
Target Allows getting/ setting the Object this handle represents.

Methods

AddrOfPinnedObject Retrieve the address of an object in a Pinned handle.
Alloc Overloaded. Allocates a Normal handle for the object specified. A normal handle ensures the object will not be collected by the garbage collector and is more space and performance efficient than the two weak handles described in GCHandleType.
Equals (inherited from ValueType) Indicates whether this instance and another object are equal.
Free Frees a GC handle. The caller must provide synchronization to prevent multiple threads from executing this call simultaneously for a given handle.
GetHashCode (inherited from ValueType) Returns the hash code for this instance.
GetType (inherited from Object) Gets the Type of the Object.
ToString (inherited from ValueType) Returns the name of the type.

Type Conversions

Int32 to GCHandle Conversion [To be supplied.]
GCHandle to Int32 Conversion [To be supplied.]

Protected:

Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

GCHandle Structure | System.Runtime.InteropServices Namespace