public void Close()
{
if (handle == IntPtr.Zero)
return;
lock (this) {
foreach (Database db in databases)
db.Close();
databases.Clear();
int st = NativeMethods.EnvClose(handle, 0);
if (st != 0)
throw new DatabaseException(st);
handle = IntPtr.Zero;
}
}