[Mailman-Developers] Mysql MemberAdaptor, v1.38
barry at python.org
Mon Nov 10 11:43:11 EST 2003
On Sat, 2003-11-08 at 08:56, Kyrian wrote:
> * AFAIK (having looked around a bit), the __del__() method should
> achieve this disconnect, etc. at the right time under python, and I've
> implemented one, which closes the relevant DB connections, but I don't
> know if it's ever called by the rest of Mailman... grepping the source
> doesn't seem to indicate that it is...
__del__() is always called implicitly by Python when an object is
destroyed, either by way of its refcount falling to zero or garbage
collection deleting it. In general, it's not a reliable way to free
external resources because you really don't know when Python will call
it, but in this case it might work okay (and may be the only option
without some hacking. ;).
More information about the Mailman-Developers