EnvClose() private method

private EnvClose ( IntPtr handle, int flags ) : int
handle System.IntPtr
flags int
return int
コード例 #1
0
 /// <summary>
 /// Closes the Environment
 /// </summary>
 /// <remarks>
 /// This method wraps the native ups_env_close function.
 /// <br />
 /// </remarks>
 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;
     }
 }