Next: , Previous: , Up: LMDB Predicates   [Contents][Index]


10.26.5.2 Memory Leaks

In order to avoid memory leaks, databases and iterators should always be closed explicitly. Consider using lmdb_with_db/[2,3] and lmdb_with_iterator/3 to automate the closing/deallocation of these objects.

Please note: a database must not be closed while there are outstanding choices for some lmdb_fetch/3 or lmdb_enumerate/3 goal that refers to that database. Outstanding choices can be removed with a cut (!).


Send feedback on this subject.