--- /dev/null
+Return-Path: <teythoon@jade-hamburg.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 943E7431FC2\r
+ for <notmuch@notmuchmail.org>; Tue, 14 Aug 2012 10:22:13 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id xm95IG9l+PeQ for <notmuch@notmuchmail.org>;\r
+ Tue, 14 Aug 2012 10:22:13 -0700 (PDT)\r
+Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id DF668431FAE\r
+ for <notmuch@notmuchmail.org>; Tue, 14 Aug 2012 10:22:12 -0700 (PDT)\r
+Received: from mail.jade-hamburg.de (mail.jade-hamburg.de [85.183.11.228])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by mail.cryptobitch.de (Postfix) with ESMTPSA id 58BA85A9030\r
+ for <notmuch@notmuchmail.org>; Tue, 14 Aug 2012 19:22:11 +0200 (CEST)\r
+Received: by mail.jade-hamburg.de (Postfix, from userid 401)\r
+ id 3B1FCDF2A4; Tue, 14 Aug 2012 19:22:11 +0200 (CEST)\r
+Received: from thinkbox.jade-hamburg.de (unknown\r
+ [IPv6:2002:55b7:be4:1:213:e8ff:fe51:7a89])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested) (Authenticated sender: teythoon)\r
+ by mail.jade-hamburg.de (Postfix) with ESMTPSA id 1D638DF2A1;\r
+ Tue, 14 Aug 2012 19:22:08 +0200 (CEST)\r
+Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.80)\r
+ (envelope-from <teythoon@thinkbox.jade-hamburg.de>)\r
+ id 1T1Koh-0004th-3I; Tue, 14 Aug 2012 19:22:07 +0200\r
+Content-Type: text/plain; charset="utf-8"\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: quoted-printable\r
+From: Justus Winter <4winter@informatik.uni-hamburg.de>\r
+User-Agent: alot/0.3.2+\r
+To: Jani Nikula <jani@nikula.org>, Michal Nazarewicz <mina86@mina86.com>,\r
+ David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+References: <xa1tsjbyd8v4.fsf@mina86.com>\r
+ <87a9xx4yuj.fsf@maritornes.cs.unb.ca> <xa1tk3x1psm2.fsf@mina86.com>\r
+ <87fw7p1viu.fsf@nikula.org>\r
+In-Reply-To: <87fw7p1viu.fsf@nikula.org>\r
+Message-ID: <20120814172206.12994.63545@thinkbox.jade-hamburg.de>\r
+Subject:\r
+ =?utf-8?q?Re=3A_=E2=80=98class_Xapian=3A=3ADatabase=E2=80=99_has_no_membe?=\r
+ =?utf-8?q?r_named_=E2=80=98close=E2=80=99?=\r
+Date: Tue, 14 Aug 2012 19:22:06 +0200\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 14 Aug 2012 17:22:13 -0000\r
+\r
+Quoting Jani Nikula (2012-08-14 14:57:13)\r
+> > Is close() really required though? The comment justifies it saying\r
+> > that:\r
+> >\r
+> > Many Xapian objects hold references to the database, so merely\r
+> > deleting the database may not suffice to close it. Thus, we\r
+> > explicitly close it here.\r
+> >\r
+> > but wouldn't the database get closed when the last reference gets\r
+> > deleted anyway?\r
+\r
+Yes, it is.\r
+\r
+> IIRC this was related to how closing is handled in the python\r
+> bindings.\r
+\r
+Well this issue isn't in anyway specific to the python bindings, but\r
+in c you can determine exactly whether a database has been closed\r
+because this only happens if you explicitly destroy the database\r
+object. In any garbage collected language you have to wait for the\r
+object to be collected and this is usually not easy to detect.\r
+\r
+So we decided to explicitly close the database and to split\r
+..database_destroy in ..database_close and ..database_destroy later\r
+on.\r
+\r
+Justus\r