是不一定被自动释放掉,还是一定不被自动释放掉
我用man查了那个pthread_join的帮助,发现这么一段话
When a joinable thread terminates, its memory resources (thread
descriptor and stack) are not deallocated until another thread performs
pthread_join on it. Therefore, pthread_join must be called once for
each joinable thread created to avoid memory leaks.
也就是说只释放掉了文件描述符,和栈,但不知道堆有没有被释放掉,或许线程没有自己的堆,还请大家解释一下