On 3/30/06, Claus Assmann <[EMAIL PROTECTED]> wrote:
> On Thu, Mar 30, 2006, Ted Unangst wrote:
>
> > particular to pthreads, if you are using mutexes or somesuch on the
> > stack, you will leak memory.  (the lock on the stack is just a
> > pointer, it gets allocated on first use).
>
> All mutexes are part of structures that are allocated via malloc().
> Would those leak memory too (even if pthread_mutex_destroy() is
> called)? The application (it's the sendmail X address resolver)
> uses a new mutex/condition variable for every request in the test
> that triggers the leaks.

it should, unless the mutex is held, in which case it returns EBUSY. 
are you checking for that?

Reply via email to