public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Will Bryant <will.bryant@ecosm.com>
To: pthreads-win32@sources.redhat.com
Subject: Re: [pthread] Memory leak using pthread (pthreadVC)
Date: Mon, 05 Jan 2004 21:29:00 -0000	[thread overview]
Message-ID: <005301c3d3d3$0f41b330$1402a8c0@orca> (raw)
In-Reply-To: <!~!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.
>
>
>
>

      reply	other threads:[~2004-01-05 21:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 17:09 Patrick DUPUTZ
2004-01-05 21:29 ` Will Bryant [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='005301c3d3d3$0f41b330$1402a8c0@orca' \
    --to=will.bryant@ecosm.com \
    --cc=pthreads-win32@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).