How to close XML containers and DB environment in Perl?
692464Mar 24 2009 — edited Mar 26 2009What is the proper way to close XML containers and DB environments in Perl? I can't find this in the examples.
In DbEnv::close documentation (for C++) it is written:
=======================================================================
The DbEnv handle should not be closed while any other handle that refers to it is not yet closed; for example, database environment handles must not be closed while database handles remain open, or transactions in the environment have not yet been committed or aborted. Specifically, this includes Db, Dbc, DbTxn, DbLogc and DbMpoolFile handles.
=======================================================================
In XmlManager::openContainer documentation (for C++) it is written:
=======================================================================
Containers always remain open until the last handle referencing the container is destroyed.
=======================================================================
Does this mean that one should make sure all copies of XML container handles have been undef()'ed, and then call $dbEnv->close()?
Thanks!
STF