mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Fix not disposing callback in ResourceHandler.Skip (#3978)
This commit is contained in:
@@ -151,6 +151,9 @@ namespace CefSharp.Example
|
||||
|
||||
bool IResourceHandler.Skip(long bytesToSkip, out long bytesSkipped, IResourceSkipCallback callback)
|
||||
{
|
||||
//We don't need the callback, as it's an unmanaged resource we should dispose it (could wrap it in a using statement).
|
||||
callback.Dispose();
|
||||
|
||||
//No Stream or Stream cannot seek then we indicate failure
|
||||
if (stream == null || !stream.CanSeek)
|
||||
{
|
||||
|
||||
@@ -138,6 +138,9 @@ namespace CefSharp
|
||||
|
||||
bool IResourceHandler.Skip(long bytesToSkip, out long bytesSkipped, IResourceSkipCallback callback)
|
||||
{
|
||||
//We don't need the callback, as it's an unmanaged resource we should dispose it (could wrap it in a using statement).
|
||||
callback.Dispose();
|
||||
|
||||
//No Stream or Stream cannot seek then we indicate failure
|
||||
if (Stream == null || !Stream.CanSeek)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user