System.Runtime.InteropServices.GCHandle.Free Method

Releases a System.Runtime.InteropServices.GCHandle.

Syntax

public void Free ()

Exceptions

TypeReason
InvalidOperationExceptionThe handle has already been freed or was never initialized.

Remarks

The caller must ensure that for a given handle, GCHandle.Free is called only once.

Permissions

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0