> In my hunt for memory leeks you may want to look at what I've found.
>
> // Code to be executed by the thread
> void *vncSockConnectThread::run_undetached(void * arg)
> {
>  log.Print(LL_STATE, VNCLOG("started socket connection thread\n"));
>
>  // Go into a loop, listening for connections on the given socket
>  while (!m_shutdown)
>  {
>   // Accept an incoming connection
>   VSocket *new_socket = m_socket->Accept();
>   if (new_socket == NULL || m_shutdown) // PJM change do the m_shutdown
check
> after the accept
>    break;

This modification doesn't remove a leak.  The AddClient function will spawn
a thread to cope with the client, which will quit almost immediately,
freeing the new socket object, when it finds it cannot read from the new
socket.

Cheers,

James "Wez" Weatherall
--
          "The path to enlightenment is /usr/bin/enlightenment"
Laboratory for Communications Engineering, Cambridge - Tel : 766513
AT&T Labs Cambridge, UK                              - Tel : 343000
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------

Reply via email to