in reply to
Re: When to use forks, when to use threads ...?
in thread When to use forks, when to use threads ...?
Usually it involves reusing threads.... don't detach them and expect them to go away.... threads must return or reach the end of their code block to be joined, or self-destruct if detached. Maybe your database connection isn't finishing completely
I'm not sure I correctly understand what you are saying.
My threads where intended to last practically forever, each thread handling one distinct and 'private' database connection.
The memory leak was showing up during normal operation of the threads - apparently with each thread-switch - and I checked of course that my code would not 'grow' with a simple equivalent nonthreaded counterpart.