--- /dev/null
+Return-Path: <jrollins@finestructure.net>\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 DB8CA431FB6\r
+ for <notmuch@notmuchmail.org>; Fri, 18 May 2012 13:42:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.29\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 LXdjAWI1rv2x for <notmuch@notmuchmail.org>;\r
+ Fri, 18 May 2012 13:42:16 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+ [131.215.239.19])\r
+ by olra.theworths.org (Postfix) with ESMTP id 39AE7431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 18 May 2012 13:42:16 -0700 (PDT)\r
+Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+ by fire-doxen-postvirus (Postfix) with ESMTP id A63332E50B63;\r
+ Fri, 18 May 2012 13:42:15 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
+Received: from finestructure.net (rrcs-24-103-26-131.nyc.biz.rr.com\r
+ [24.103.26.131]) (Authenticated sender: jrollins)\r
+ by fire-doxen-submit (Postfix) with ESMTP id D018D32806F;\r
+ Fri, 18 May 2012 13:42:12 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+ id A8EBF4AD; Fri, 18 May 2012 13:42:11 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
+ Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH v2 5/5] cli: lazily create the crypto gpg context only\r
+ when needed\r
+In-Reply-To: <4FB6B2F5.6090105@fifthhorseman.net>\r
+References: <1337362357-31281-1-git-send-email-jrollins@finestructure.net>\r
+ <1337362357-31281-2-git-send-email-jrollins@finestructure.net>\r
+ <1337362357-31281-3-git-send-email-jrollins@finestructure.net>\r
+ <1337362357-31281-4-git-send-email-jrollins@finestructure.net>\r
+ <1337362357-31281-5-git-send-email-jrollins@finestructure.net>\r
+ <1337362357-31281-6-git-send-email-jrollins@finestructure.net>\r
+ <20120518192157.GV11804@mit.edu>\r
+ <87txzd9su3.fsf@servo.finestructure.net>\r
+ <4FB6B2F5.6090105@fifthhorseman.net>\r
+User-Agent: Notmuch/0.12+183~g9d5ff3c (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 18 May 2012 13:42:11 -0700\r
+Message-ID: <87ehqh9q70.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+ micalg=pgp-sha256; protocol="application/pgp-signature"\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: Fri, 18 May 2012 20:42:18 -0000\r
+\r
+--=-=-=\r
+\r
+On Fri, May 18 2012, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:\r
+> You could provide a "destructor" function for notmuch_crypto_t, which\r
+> whoever is responsible for the struct would need to call when they are\r
+> ready to dispose of it.\r
+>\r
+> The destructor would just destroy any GMIME crypto contexts pointed to\r
+> by the struct, and reset those pointers to NULL.\r
+\r
+That sounds reasonable. I'll see if I can hack something like that.\r
+\r
+> Since the common workflow is a singleton notmuch_crypto_t that is a\r
+> subobject of the singleton notmuch_params_t, you could just call that\r
+> destructor function before the notmuch_params_t falls out of scope.\r
+\r
+Just to be clear, notmuch_crypto_t is not only used as a subobject of\r
+notmuch_show_params_t. At least in what I submitted it is used on it's\r
+own in notmuch-reply.c, in place of notmuch_show_params_t, since the\r
+reply code was only using the crypto context to decrypt messages being\r
+replied to. So it's probably best to handle it independently of\r
+notmuch_show_params_t.\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJPtrQjAAoJEO00zqvie6q8nOMQAIxUhK6waeFE0Y9UbJNAezt6\r
+TKWu3UKV7Q9aBQgoJc3GjzR96qwx6i5Rma9n7CoZeNgNRl8qPd9hIzRRToWClJ6D\r
+N/KaPtJwikbO1CSBgn3kfzaH4rS4F1HACZIqLM7mDiBLlL47dMfh2v41ixWaqlyX\r
+R2ndkHL/Aer820/guhlnIKy+sKHJa7zFxsrJghlhqrEHyDomWrteCnzhXF+3AgRb\r
+MXVNc/tXxBXE734ohkWPYT9mIMlwiInoEfSWdgMuoh7FOUXZEpPfvcfJFjq4PyUE\r
+NfjJA3omFUZHGcJdeSz/eU5ArdPfUJ+0HDxVmH0vkekI8gtsPTiW8ib3ctnjuKud\r
+bPtaumed71rJC0VGu5LEz+SiYz+6ievB9ZEvuW5liTJl2hUUixqD5RPvFk/kubKI\r
+SLKa7Xp1qet84moI696jhrBWESz8jJTnM96TuWZMuUHGGeLh/ipQLbar3ZyThuUC\r
+BtH5C4zqxtsw1jtz5Zrhz98IzLBtmvwuEFt33Vk6EhijoqImlAUPvq4E9CMrWh8i\r
+pvF0sxd9o6LsdjZdUOzJ5lxlwLqqUdfYnmr047WjcosJJnajOoCjIYRPrk+LVWee\r
+xuStWV/wiv/prp4d0k0KzKIzWOQVWmsvfNE2zUdTS2SG9zUOVWrWi2vhRKtSFbHs\r
+Cz9kUhDLyEZpWgZI8Hu4\r
+=5xLB\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r