[Xcb] Doubled API size (was: xcb-util: ewmh library)

Carsten Meier cm at trexity.de
Thu Dec 3 08:50:41 PST 2009

Am Wed, 02 Dec 2009 19:34:43 -0500
schrieb Peter Harris <pharris at opentext.com>:

> Given those two functions, this becomes an attractive function:
>  - xcb_discard_cookie(connection, cookie) - performs an
> xcb_uncheck_cookie(), and discards any reply (or future reply).
> In particular, xcb_discard_cookie would be useful for garbage
> collected languages that want to bind to C libxcb instead of
> implementing their own XCB core (for interoperability reasons). When
> toying with a Lua wrapper, I kept having to *_reply(cookie) in the
> cookie garbage collector in order to avoid leaks. It would be more
> efficient to not wait for the network.

Yes, I ran into the same problems during the implementation of a
C++-auto_ptr for replies. It would be very nice if somebody could add
a discard_cookie-function.


More information about the Xcb mailing list