nanogui: Possible bug in GrSendClientData?
Subject:
Re: [nanogui] Possible bug in GrSendClientData?
From:
"Greg Haerr" ####@####.####
Date:
1 Aug 2004 19:07:59 +0100
Message-Id: <004d01c477f3$517cd3f0$6401a8c0@gregnewport>
> Also, I assume that the malloc's done for the GsDeliverClientDataEvent()
> are the pointers that are delivered to the recipient, and the recipient,
> ie destination window id, application code is responsible for free'ing
> it, etc
Well, almost. In the client/server environment, the client
data that is malloc'd by the server is special-cased, and
written on the client socket after the event, and then freeed
by the server in nanox/srvnet.c::GrGetNextEventWrapperFinish().
The client data space is malloc'd for again by the client in
nanox/client.c::CheckForClientData(). Finally, the client is
responsible for freeing that malloc, but the pointers aren't
the same. This above code is not required for the
LINK_APP_INTO_SERVER case, when your
above comments are correct.
Regards,
Greg