[Twisted-Python] Is there pb documentation somewhere?

Dustin J. Mitchell dustin at v.igoro.us
Mon Aug 18 15:18:48 MDT 2014


On Mon, Aug 18, 2014 at 3:37 PM, Daniel Sank <sank.daniel at gmail.com> wrote:
> and I send you the Referenceable. Now suppose I do
>
> del myThingy
>
> Now myThingy will be garbage collected.

No, this is simply incorrect.  'del myThingy' simply removes a
reference to the object to which myThingy refers.

If and only if that's the last reference (as determined by Python's
reference counting), it is deleted.  As glyph said, as long as there
is an outstanding remote reference, the Broker keeps a Python
reference to the object internally, preventing the reference count
from reaching zero, preventing the object from being deleted.

Dustin




More information about the Twisted-Python mailing list