[py-lmdb] Re: create_env() and open_env()

  • From: David Wilson <dw@xxxxxxxx>
  • To: py-lmdb@xxxxxxxxxxxxx
  • Date: Fri, 23 May 2014 12:24:28 +0000

Aah, now I understand.

Yes, the flow is:

 * mdb_env_create() allocates a MDB_env on the heap, but does nothing
   else.

 * mdb_env_set_flags() controls options used for the MDB_env

 * mdb_env_open() physically constructs the on-diks representation and
   populates the MDB_env with data from it.

 * mdb_env_close() stops using the disk file and deallocates the MDB_env


lmdb.Environment.__init__() does a combination of mdb_env_create(),
mdb_env_set_flags(), and mdb_env_open().


David

Other related posts: