I noticed what I believe may be a handle leak against the latest (commit 
7b9928c) on github, with the MDB_VL32 on Windows.  After some poking around, it 
seems to be the file mapping handle, env->me_fmh.   I threw it to a CloseHandle 
in the env_close0(…) and it seemed to resolve it.

Here’s a quick diff:

diff --git a/src/lmdb.c b/src/mdb.c
index a564d40..190c860 100644
--- a/src/mdb.c
+++ b/src/mdb.c
@@ -5350,6 +5350,7 @@ mdb_env_close0(MDB_env *env, int excl)
             }
#ifdef MDB_VL32
#ifdef _WIN32
+   if (env->me_fmh) CloseHandle(env->me_fmh);
             if (env->me_rpmutex) CloseHandle(env->me_rpmutex);
#else
             pthread_mutex_destroy(&env->me_rpmutex);

Reply via email to