DbEnv* open_env(const char *env_home, u_int32_t set_flags, u_int32_t oflags=DB_CREATE|DB_INIT_MPOOL, u_int32_t cachesize=4 *1024 *1024, int mode=0644, u_int32_t cflags=0)
Helper function to open an environment and register it into dbstl for the calling thread.
Users still need to register it in any other thread if it is shared by multiple threads, via register_db_env() function above. Users don't need to delete or free the memory of the returned object, dbstl will take care of that.
When you don't use dbstl::open_env() but explicitly call DB C++ API to open an environment, you must new the DbEnv object, rather than create it on stack, and you must delete the DbEnv object by yourself.