[PATCH 04/21] vim: refactor database handling

2013-11-02 Thread Felipe Contreras
To minimize memory usage we need to destroy the queries and the databases, so we should keep track of them. Each buffer gets a database connection that is destroyed when the buffer is destroyed, and all the queries along with it. Ideally notmuch should destroy the queries when the database is

[PATCH 04/21] vim: refactor database handling

2013-11-02 Thread Felipe Contreras
To minimize memory usage we need to destroy the queries and the databases, so we should keep track of them. Each buffer gets a database connection that is destroyed when the buffer is destroyed, and all the queries along with it. Ideally notmuch should destroy the queries when the database is