[patch 3/3] re-using and garbage collection of python BusName objects

Robert McQueen robert.mcqueen at collabora.co.uk
Tue Oct 4 04:18:43 PDT 2005


This sets up a WeakValueDictionary per-connection to cache instances of
BusName objects, overrides creation (__new__) to pull instances from the
cache, and uses release_name from __del__ to remove the low-level name
when they go out of scope.

Also attached is a test program which shows this and the lower-level
code behaving correctly.

Regards,
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-python-cache-bus-names.patch
Type: text/x-patch
Size: 2928 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051004/0191df01/dbus-python-cache-bus-names-0001.bin


More information about the dbus mailing list