From pthread_join() man page:
When a joinable thread terminates, its memory resources (thread descriptor and stack) are not deallocated until thread performs pthread_join on it. Therefore, pthread_join must be called once for each joinable thread created to avoid memory leaks.
Does it mean I need to join each thread I create to prevent leaks? But joining blocks the caller.
Please, explain.