Dispose MemoryBlock in zwinderbuffer (fixes #2304)

This commit is contained in:
zeromus 2020-08-14 08:12:44 -04:00
parent 356dfcebdb
commit 1d87bcd29c
2 changed files with 8 additions and 2 deletions

View File

@ -83,7 +83,7 @@ namespace BizHawk.Client.Common
public void Dispose() public void Dispose()
{ {
// this possess no resources to dispose of, but other IRewinder impls might _buffer.Dispose();
} }
public void Clear() public void Clear()

View File

@ -7,7 +7,7 @@ using BizHawk.Common;
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
{ {
public class ZwinderBuffer public class ZwinderBuffer : IDisposable
{ {
/* /*
Main goals: Main goals:
@ -34,6 +34,12 @@ namespace BizHawk.Client.Common
_useCompression = settings.UseCompression; _useCompression = settings.UseCompression;
} }
public void Dispose()
{
_buffer.Dispose();
}
/// <summary> /// <summary>
/// Number of states that could be in the state ringbuffer, Mask for the state ringbuffer /// Number of states that could be in the state ringbuffer, Mask for the state ringbuffer
/// </summary> /// </summary>