From 9c21601861783acb14ad70348c18fa1767612a8c Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 13 Aug 2015 21:56:48 -0500 Subject: [PATCH] fix Clear() operation on that new data structure --- BizHawk.Common/NDBDatabase.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BizHawk.Common/NDBDatabase.cs b/BizHawk.Common/NDBDatabase.cs index 989c348b6a..fded9c296f 100644 --- a/BizHawk.Common/NDBDatabase.cs +++ b/BizHawk.Common/NDBDatabase.cs @@ -13,12 +13,13 @@ namespace BizHawk.Common /// public class NDBDatabase : IDisposable { - FileStream Stream; - int BlockSize; + readonly int BlockSize; + readonly long BlockCount; + Dictionary Items = new Dictionary(); LinkedList FreeList = new LinkedList(); - readonly long BlockCount; long FreeWatermark; + FileStream Stream; class Block { @@ -74,6 +75,7 @@ namespace BizHawk.Common public void Clear() { Consumed = 0; + Items.Clear(); FreeList.Clear(); FreeWatermark = 0; }