我不知道为什么下面的代码会产生内存泄漏
XTL::CManagedInternetHandle hRemoteFile;
XTL::CUrlExPtr pFinalUrl;
if (dwServiceType == INTERNET_SERVICE_HTTP)
{
throw CWindowsInternetException(url, E_FAIL, L"Unable to get final URL.");
但是,当我把投掷移到上面时,就像这样
XTL::CManagedInternetHandle hRemoteFile;
XTL::CUrlExPtr pFinalUrl;
throw CWindowsInternetException(url, E_FAIL, L"Unable to get final URL.");
if (dwServiceType == INTERNET_SERVICE_HTTP)
{
没有发生内存泄漏。