Permalink
Browse files

Properly dispose all esent resources

git-svn-id: https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk@2061 079b0acf-d9fa-0310-9935-e5ade295c882
  • Loading branch information...
1 parent 92f56c9 commit 6a4282b886263109233aa07284e05cd4ab97b2ef ayenderahien committed Feb 20, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 Rhino.PersistentHashTable/PersistentHashTableActions.cs
@@ -10,7 +10,6 @@ namespace Rhino.PersistentHashTable
{
public class PersistentHashTableActions : IDisposable
{
- private readonly string database;
private readonly Session session;
private readonly Transaction transaction;
private readonly Table keys;
@@ -63,7 +62,6 @@ public Table Data
public PersistentHashTableActions(Instance instance, string database, Cache cache, Guid instanceId)
{
- this.database = database;
this.cache = cache;
this.instanceId = instanceId;
session = new Session(instance);
@@ -448,6 +446,10 @@ public void Dispose()
keys.Dispose();
if (data != null)
data.Dispose();
+ if (identity != null)
+ identity.Dispose();
+ if (list != null)
+ list.Dispose();
if (Equals(dbid, JET_DBID.Nil) == false)
Api.JetCloseDatabase(session, dbid, CloseDatabaseGrbit.None);

0 comments on commit 6a4282b

Please sign in to comment.