Wednesday, February 18, 2009

How to release IntPtr handle C#

If you are using IntPtr as handles in C# code and wish to avoid handle leaks you may use :

IntPtr handle = some handle;
Marshal.Release(handle);

Google search didn't give me correct answer instantly so I added it here :)

cherio!!
Vaibhav


No comments: