[Xcb] leak in lissajoux

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Fri Apr 28 11:13:54 PDT 2006



> > So, what should I do ? returning the reply, so that the user can manage it
> > ? If so, when must that reply be freed ?
>
> Heh, I think I understand your confusion. ShmGetImage has a
> wacky-looking reply: there isn't really any information in it.

indeed. I've put a comment in xcb_image about that. We can get the visual
Id. And that is the only useful thing that I can see, if it's useful :)

>
> But you have to wait for the reply to arrive before you can read out of
> the shared memory segment. Until the reply arrives you have no guarantee
> that the server has written your image to the segment.

ok

> So yes, you have to block on the reply, but you can immediately free it
> when it arrives. You should probably return 0 if the reply is null,
> though, as that indicates that some sort of error occurred.

good idea.

> Of course, using latency hiding would be nice here. So maybe the API
> could stand a redesign -- but that applies to the whole XImage API
> anyway. The API we have now is presently passable, particularly for
> people porting preexisting projects.

I agree about the design. But i really wonder what to do :p If you have
some ideas to put somewhere (here or in bugzilla), i would be pleased to
read it :)

Vincent


More information about the Xcb mailing list