MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / ~ThreadPool

Method ~ThreadPool

practice/threadpool.cpp:28–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26public:
27 ThreadPool() {}
28 ~ThreadPool() {
29 // 释放 Thread 对象占用的堆资源
30 for (int i = 0; i < _pool.size(); ++ i) {
31 delete _pool[i];
32 }
33 }
34
35 // 开启线程池
36 void startPool(int size)

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected