Mono Class Library: System.Runtime.InteropServices.GCHandle Overview | Members

System.Runtime.InteropServices.GCHandle.Free Method

Frees a System.Runtime.InteropServices.GCHandle.

public void Free ()

Permissions

TypeReason
System.Security.Permissions.SecurityPermissionRequires permission to call unmanaged code. See System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode .

Exceptions

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

Remarks

The caller is required to provide synchronization to prevent multiple threads from executing this method simultaneously for a given handle.

Requirements

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