/// <summary>
/// Process-wide cleanup -- call just before exiting process.
/// </summary>
/// <remarks>
/// While it's not necessary that your program call this method
/// before exiting, doing so will prevent leaks of native cURL resources.
/// </remarks>
public static void GlobalCleanup()
{
if (_initCode == CurlCode.Ok)
{
#if USE_LIBCURLSHIM
NativeMethods.curl_shim_cleanup();
#endif
NativeMethods.curl_global_cleanup();
_initCode = CurlCode.FailedInit;
}
}