]> git.cworth.org Git - notmuch/commit
lib: move deallocation of memory from n_d_close to n_d_destroy
authorDavid Bremner <david@tethera.net>
Tue, 14 Jul 2020 11:25:28 +0000 (08:25 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 22 Jul 2020 22:52:55 +0000 (19:52 -0300)
commit095d3d7134f5668b96cf1d70997d3f110b03c898
treeb8797c00c8898b2e7b26172e91e0ee24b94837cc
parent920dc56e605405bb7413d958ac80b8b84d7a8a0f
lib: move deallocation of memory from n_d_close to n_d_destroy

In order to mimic the "best effort" API of Xapian to provide
information from a closed database when possible, do not
destroy the Xapian database object too early.

Because the pointer to a Xapian database is no longer nulled on close,
introduce a flag to track whether the notmuch database is open or not.
lib/database-private.h
lib/database.cc