From 5cc55b50addd9dd45c577d2844ab8ef89b72e849 Mon Sep 17 00:00:00 2001 From: amaitland Date: Wed, 15 Apr 2015 17:25:19 +1000 Subject: [PATCH] Switch SchemeHandlerResponse to using a more traditional destructor and calling delete on the object (I think it explains the behaviour better when reading the code) --- CefSharp.Core/ResourceHandlerWrapper.cpp | 2 +- CefSharp.Core/SchemeHandlerResponse.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CefSharp.Core/ResourceHandlerWrapper.cpp b/CefSharp.Core/ResourceHandlerWrapper.cpp index 878992567..f02758971 100644 --- a/CefSharp.Core/ResourceHandlerWrapper.cpp +++ b/CefSharp.Core/ResourceHandlerWrapper.cpp @@ -68,7 +68,7 @@ namespace CefSharp // Must be done AFTER CEF has been allowed to consume the headers etc. After this call is made, the SchemeHandlerWrapper // instance has likely been deallocated. - response->ReleaseSchemeHandlerWrapper(); + delete response; } void ResourceHandlerWrapper::GetResponseHeaders(CefRefPtr response, int64& response_length, CefString& redirectUrl) diff --git a/CefSharp.Core/SchemeHandlerResponse.h b/CefSharp.Core/SchemeHandlerResponse.h index f8914089c..fa80bb228 100644 --- a/CefSharp.Core/SchemeHandlerResponse.h +++ b/CefSharp.Core/SchemeHandlerResponse.h @@ -60,7 +60,7 @@ namespace CefSharp _schemeHandlerWrapper = schemeHandlerWrapper; } - void ReleaseSchemeHandlerWrapper() + ~SchemeHandlerResponse() { _schemeHandlerWrapper = nullptr; }