以下代码
#include <deque>
int main() {
std::deque<int> Q;
return 0;
}
根据valgrind生成一个非干净的出口:
==9942== HEAP SUMMARY:
==9942== in use at exit: 72,704 bytes in 1 blocks
==9942== total heap usage: 3 allocs, 2 frees, 73,280 bytes allocated
==9942==
==9942== LEAK SUMMARY:
==9942== definitely lost: 0 bytes in 0 blocks
==9942== indirectly lost: 0 bytes in 0 blocks
==9942== possibly lost: 0 bytes in 0 blocks
==9942== still reachable: 72,704 bytes in 1 blocks
==9942== suppressed: 0 bytes in 0 blocks
在Linux Mint上用g ++编译的代码。
这是标准库中的错误吗?
有没有办法让干净的退出?
更改为&#34; new
/ delete
&#34;方法只报告4个分配和3个释放......