This is the mail archive of the
pthreads-win32@sourceware.org
mailing list for the pthreas-win32 project.
RE: Memory leak with detached threads
- From: "Stephen Croall" <scroall at tibco dot com>
- To: "Giuliano Catrambone" <giuliano dot catrambone at catrasoftware dot it>
- Cc: <pthreads-win32 at sources dot redhat dot com>
- Date: Sun, 29 Oct 2006 10:54:43 -0800
- Subject: RE: Memory leak with detached threads
Hi,
You aren't freeing the handle to the created thread :)
If you aren't interested in using the handle later on call
pthread_detach() to free the resources for the thread handle.
Steve.
--
J. Architect/Principal Engineer, Tibco Software Ltd.
T. +44 (0) 1792 360773
M. +44 (0) 7788 971394
E. scroall@tibco.com
W. www.tibco.com
> -----Original Message-----
> From: pthreads-win32-owner@sourceware.org
> [mailto:pthreads-win32-owner@sourceware.org] On Behalf Of
> Giuliano Catrambone
> Sent: 29 October 2006 19:43
> To: pthreads-win32@sources.redhat.com
> Subject: Memory leak with detached threads
>
> Hi all,
> I found a memory leak working with detached threads.
> I just made a simple C code to demonstrate where I have
> the memory leak.
>
> Running the attached C code I saw about 4KB of memory
> leak every 20
> iteration.
>
> I'm using pthreads-dll-2005-03-08.
>
> Could you tell me if I'm wronging something or if it is a bug?
> Thanks in advance
> giu
>
> --
> -----------------------------------------------------------------
> Giuliano Catrambone
> Director, Professional Services
>
> Open source projects:
> http://sourceforge.net/projects/catralibraries/
> http://sourceforge.net/projects/openstreaming/
>
> CatraSoftware:
> Home page: http://www.catrasoftware.it
>
> Streaming page:
> http://www.catrasoftware.it/Streaming/CatraStreamingPlatform.htm
>
> Mobile +39.393.8816655
> Fixed: +39.02.90377228
> Skype: Catrambone Giuliano
> msn: giulianocatrambone@hotmail.com
> Jabber: giuliano.catrambone@Jabber.org
> Yahoo: giuliano.catrambone
> -----------------------------------------------------------------
>
>
>