private void Dispose(bool disposing)
{
lock (this)
{
// if (disposing) cleanup managed objects
if (_pShare != IntPtr.Zero)
{
#if USE_LIBCURLSHIM
NativeMethods.curl_shim_cleanup_share_delegates(_pShare);
#endif
NativeMethods.curl_share_cleanup(_pShare);
_hThis.Free();
_ptrThis = IntPtr.Zero;
_pShare = IntPtr.Zero;
}
}
}