Hi Martin, Martin Okrslar wrote:
Dear Boost users,
is the BGL leaky? For example the code added below produces memory leaks (as seen from also added valgrind output). When I comment out the line marked by /* THIS LINE DOES IT */, there are no leaks. I am running BGL 1.29 and gcc 3.2.
Any ideas for a work-around?
[...]
==23473== definitely lost: 0 bytes in 0 blocks. ==23473== possibly lost: 0 bytes in 0 blocks. ==23473== still reachable: 384 bytes in 1 blocks. ==23473== ==23473== 384 bytes in 1 blocks are still reachable in loss record 1 of 1 ==23473== at 0x4004A3A8: __builtin_new (vg_clientfuncs.c:125) ==23473== by 0x4004A3F6: operator new(unsigned) (vg_clientfuncs.c:138) ==23473== by 0x4035E4F1: ??? (bits/stl_alloc.h:482) ==23473== by 0x4035E40D: ??? (bits/stl_alloc.h:532)
Strictly speaking, I'm not sure this is memory leak. If there non-zero values in "definitely list" column, it's surely a leak. But here it can be something reasonable. For example, memory allocator may reserve a small chunk of memory. I think there's is not problem here. - Volodya