This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: [pthread] Memory leak using pthread (pthreadVC)
- From: Will Bryant <will dot bryant at ecosm dot com>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Tue, 06 Jan 2004 10:29:51 +1300
- Subject: Re: [pthread] Memory leak using pthread (pthreadVC)
- References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAfWPP1pogW0WpmQI7OEj5xcKAAAAQAAAAXRvjP6hN/kKdpz8UsMx9egEAAAAA@wanadoo.fr>
Hi Patrick,
I suggest you have a read through the standard pthreads documentation. You
must either pthread_join your threads, or pthread_detach them.
Cheers,
Will
----- Original Message -----
From: "Patrick DUPUTZ" <patrick.duputz@wanadoo.fr>
To: <pthreads-win32@sources.redhat.com>
Sent: Tuesday, January 06, 2004 6:09 AM
Subject: [pthread] Memory leak using pthread (pthreadVC)
> 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.
>
>
>
>