[patch 3/3] re-using and garbage collection of python BusName
objects
Robert McQueen
robert.mcqueen at collabora.co.uk
Tue Oct 4 04:33:46 PDT 2005
Ooops, that button was marked "Send", not "Attach". Here is the test
program, and another patch (4/3?) that I forgot about, to add constants
representing the return values of RequestName and ReleaseName.
Regards,
Rob
Robert McQueen wrote:
> 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-reply-values.patch
Type: text/x-patch
Size: 1629 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051004/e261e20d/dbus-python-reply-values.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-busname.py
Type: text/x-python
Size: 1870 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051004/e261e20d/test-busname.py
More information about the dbus
mailing list