mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 19:54:53 +00:00
Do not self-dispose CefCallbackWrapper
Because ResourceHandlerWrapper already takes care of this. Fixes AccessViolationException noted in #1143
This commit is contained in:
@@ -42,8 +42,6 @@ namespace CefSharp
|
||||
ThrowIfDisposed();
|
||||
|
||||
_callback->Cancel();
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void Continue()
|
||||
@@ -52,7 +50,10 @@ namespace CefSharp
|
||||
|
||||
_callback->Continue();
|
||||
|
||||
delete this;
|
||||
// Do not self-dispose here or in Cancel because ResourceHandlerWrapper
|
||||
// already has a reference to this callback and will take care
|
||||
// of its disposal. See GitHub issue #1143 for a repro of an
|
||||
// AccessViolationException caused by self-disposal.
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user