[Xcb] Xpyb memory leak

Paul Colomiets paul at colomiets.name
Tue Jul 5 16:10:59 PDT 2011


Hi,

I believe there is a memory leak in xpyb. It's somewhere in C code,
so garbage collector does not detects it. Basically reply objects
free only at exit of the program. You can find the test code at the
end of this email.

Have any body experienced similar problems?
Could somebody look up the problem? I've spent a few hours
trying to spot this bug without a success.
May be I use protocol in the wrong way or there is a cache,
so that memory growth is expected?

BTW, is it apropriate mailing list for xpyb? :)

-- 
Paul

In the case this script does not work, the hardcoded
value 0x15d is root window id, which you can find out
by running "xwininfo -root"
-----------------------------------
import xcb.xproto

conn = xcb.Connection()

def mkatom(name):
    return conn.core.InternAtom(False, len(name), name).reply().atom

prop = mkatom('XFree86_VT')

while True:
    conn.core.GetProperty(
            False, 0x15d,
            prop,
            xcb.xproto.GetPropertyType.Any,
            0, (2**32)-1
        ).reply()


More information about the Xcb mailing list