private void Dispose(bool disposing) { lock (this) { if (disposing) { // clean up managed objects } // clean up native objects if (_pItems[0] != IntPtr.Zero) { NativeMethods.curl_formfree(_pItems[0]); } _pItems[0] = IntPtr.Zero; _pItems[1] = IntPtr.Zero; } }