DOH! Just realised that you are calling pthread_attr_setdetachstate(). You could change to calling pthread_detach() to see if the memory leak still happens. We use this call a lot in our code and have no problems with leaks. Steve.