[Xcb] Enhance cookie class
julien at danjou.info
Tue Jan 19 13:04:23 PST 2010
This is a set of patches for xpyb again.
Patch #1 is simple. :-)
Patch #2 avoid stucking the program when calling .reply() on a cookie
multiple times. We are now storing the reply and returning it again.
The other option was to raise an error, but I really don't think it's better.
Patch #3 is tricky and even if it's short, need a review.
Currently, AFAIK, if you do not call .reply() on a cookie, you're leaking
memory because you do not fetch the reply from the reply pool.
So we are now doing it automatically on object deallocation if needed.
This does not take into account possible error on the connection, but I doubt
we can do anything like returning an exception in dealloc, so be it.
// ᐰ <julien at danjou.info> http://julien.danjou.info
More information about the Xcb