I am assuming once a detached thread reaches the end of its code block it should automatically quit and the OS should recover that memory?
I'm really not an expert here, but I don't think that's the case, at least not always. The OS probably doesn't have any idea about which parts of the memory is associated to which user-level thread, and thus can't clean up. It does know about processes though, which is why I recommended them over threads.
In reply to Re^3: Multithreaded memory usage
by moritz
in thread Multithreaded memory usage
by bingohighway
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |