The following code
#include <deque>
int main() {
std::deque<int> Q;
return 0;
}
produces a non-clean exit as per 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
Code compiled with g++ on Linux Mint.
Is this a bug in the standard library?
Is there any way to get a clean exit?
Changing to a "new
/delete
" methodology just reports 4 allocs and 3 frees...