From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8624 invoked by alias); 5 Jan 2004 21:29:34 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 8615 invoked from network); 5 Jan 2004 21:29:33 -0000 Received: from unknown (HELO linda-3.paradise.net.nz) (202.0.58.22) by sources.redhat.com with SMTP; 5 Jan 2004 21:29:33 -0000 Received: from smtp-2.paradise.net.nz (smtp-2a.paradise.net.nz [202.0.32.195]) by linda-3.paradise.net.nz (Paradise.net.nz) with ESMTP id <0HR1002WHD189A@linda-3.paradise.net.nz> for pthreads-win32@sources.redhat.com; Tue, 06 Jan 2004 10:29:33 +1300 (NZDT) Received: from orca (203-79-66-6.adsl-wns.paradise.net.nz [203.79.66.6]) by smtp-2.paradise.net.nz (Postfix) with SMTP id EDEF49E28A for ; Tue, 06 Jan 2004 10:29:31 +1300 (NZDT) Date: Mon, 05 Jan 2004 21:29:00 -0000 From: Will Bryant Subject: Re: [pthread] Memory leak using pthread (pthreadVC) To: pthreads-win32@sources.redhat.com Message-id: <005301c3d3d3$0f41b330$1402a8c0@orca> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit References: X-SW-Source: 2004/txt/msg00001.txt.bz2 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" To: 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. > > > >