Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我使用pthread_create启动一个线程,而在父线程中我没有调用pthread_join进行同步,会导致内存泄漏?
如果你pthread_detach()它,它不会。
pthread_detach()
如果不是,它必须持有一些内存(即泄漏),因为返回结果必须无限期地存储在某个地方,等待可能的pthread_join().
pthread_join()