Frees a GC handle. The caller must provide synchronization to prevent multiple threads from executing this call simultaneously for a given handle.
[Visual Basic] Public Sub Free() [C#] public void Free(); [C++] public: void Free(); [JScript] public function Free();
Exception Type | Condition |
---|---|
InvalidOperationException | will be thrown if the handle was never initialized or if it was freed. |
GCHandle Structure | GCHandle Members | System.Runtime.InteropServices Namespace