[pthread] Memory leak using pthread (pthreadVC)

Patrick DUPUTZ patrick.duputz@wanadoo.fr
Mon Jan 5 17:09:00 GMT 2004


Hi,
       
I'm a new user of Posix Thread for Win32 (using pthreadVC.dll) and I
have encountered a problem of memory leak in my program since I replaced
the Win32 thread calls by Posix ones. Here is my program in the main
lines, did I miss something?
       
       // My thread
       void * ClientThread ( void * )
       {
       	// pthread_exit( NULL ); // Commented because that does not
compile under MS Visual C+ 6.0 (don't know why!)
       
       	return( NULL ); // no other solution to compile..
       }
       
       // My Main
       void Main(.)
       {
       	pthread_t tid;
       
       	while ( true )
       	{
       		pthread_create( &tid, NULL, ClientThread, &arg );
       	}
       	exit( 0 );
       }
       
       
Kind Regards,
          Xterminhate.
       
       



More information about the Pthreads-win32 mailing list