【发布时间】:2013-06-05 09:24:10
【问题描述】:
在我的程序中,我处理新线程
pthread_t thread;
pthread_create(&thread, NULL,
c->someFunction, (void *) fd); //where fd is ID of the thread
问题很简单 - 如果我只是让 someFunction 完成,那么是否需要在 C++ 中调用某些东西,例如join 或其他任何东西,以防止 memory leaks 或内存自动释放??
【问题讨论】:
标签: c++ memory-management pthreads