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. Thanks for your answer!