1 2 valgrind output will go to log 3 VALGRIND_DO_LEAK_CHECK 4 8 bytes in 1 blocks are definitely lost in loss record ... of ... 5 by 0x........: doit() (leak_cpp_interior.cpp:115) 6 by 0x........: main (leak_cpp_interior.cpp:130) 7 8 LEAK SUMMARY: 9 definitely lost: 8 bytes in 1 blocks 10 indirectly lost: 0 bytes in 0 blocks 11 possibly lost: 0 bytes in 0 blocks 12 still reachable: 239 bytes in 8 blocks 13 of which reachable via heuristic: 14 stdstring : 80 bytes in 2 blocks 15 length64 : 31 bytes in 1 blocks 16 newarray : 32 bytes in 1 blocks 17 multipleinheritance: 48 bytes in 2 blocks 18 suppressed: 0 bytes in 0 blocks 19 Reachable blocks (those to which a pointer was found) are not shown. 20 To see them, rerun with: --leak-check=full --show-leak-kinds=all 21 22 leak_check summary heuristics multipleinheritance 23 LEAK SUMMARY: 24 definitely lost: 8 (+0) bytes in 1 (+0) blocks 25 indirectly lost: 0 (+0) bytes in 0 (+0) blocks 26 possibly lost: 143 (+143) bytes in 4 (+4) blocks 27 still reachable: 96 (-143) bytes in 4 (-4) blocks 28 of which reachable via heuristic: 29 stdstring : 0 (-80) bytes in 0 (-2) blocks 30 length64 : 0 (-31) bytes in 0 (-1) blocks 31 newarray : 0 (-32) bytes in 0 (-1) blocks 32 multipleinheritance: 48 (+0) bytes in 2 (+0) blocks 33 suppressed: 0 (+0) bytes in 0 (+0) blocks 34 To see details of leaked memory, give 'full' arg to leak_check 35 36 leak_check summary any heuristics newarray 37 LEAK SUMMARY: 38 definitely lost: 8 (+0) bytes in 1 (+0) blocks 39 indirectly lost: 0 (+0) bytes in 0 (+0) blocks 40 possibly lost: 128 (-15) bytes in 4 (+0) blocks 41 still reachable: 111 (+15) bytes in 4 (+0) blocks 42 of which reachable via heuristic: 43 newarray : 63 (+63) bytes in 2 (+2) blocks 44 multipleinheritance: 0 (-48) bytes in 0 (-2) blocks 45 suppressed: 0 (+0) bytes in 0 (+0) blocks 46 To see details of leaked memory, give 'full' arg to leak_check 47 48 leak_check summary heuristics length64 49 LEAK SUMMARY: 50 definitely lost: 8 (+0) bytes in 1 (+0) blocks 51 indirectly lost: 0 (+0) bytes in 0 (+0) blocks 52 possibly lost: 160 (+32) bytes in 5 (+1) blocks 53 still reachable: 79 (-32) bytes in 3 (-1) blocks 54 of which reachable via heuristic: 55 length64 : 31 (+31) bytes in 1 (+1) blocks 56 newarray : 0 (-63) bytes in 0 (-2) blocks 57 suppressed: 0 (+0) bytes in 0 (+0) blocks 58 To see details of leaked memory, give 'full' arg to leak_check 59 60 leak_check summary heuristics stdstring 61 LEAK SUMMARY: 62 definitely lost: 8 (+0) bytes in 1 (+0) blocks 63 indirectly lost: 0 (+0) bytes in 0 (+0) blocks 64 possibly lost: 111 (-49) bytes in 4 (-1) blocks 65 still reachable: 128 (+49) bytes in 4 (+1) blocks 66 of which reachable via heuristic: 67 stdstring : 80 (+80) bytes in 2 (+2) blocks 68 length64 : 0 (-31) bytes in 0 (-1) blocks 69 suppressed: 0 (+0) bytes in 0 (+0) blocks 70 To see details of leaked memory, give 'full' arg to leak_check 71 72 leak_check summary heuristics multipleinheritance,newarray,stdstring,length64 73 LEAK SUMMARY: 74 definitely lost: 8 (+0) bytes in 1 (+0) blocks 75 indirectly lost: 0 (+0) bytes in 0 (+0) blocks 76 possibly lost: 0 (-111) bytes in 0 (-4) blocks 77 still reachable: 239 (+111) bytes in 8 (+4) blocks 78 of which reachable via heuristic: 79 stdstring : 80 (+0) bytes in 2 (+0) blocks 80 length64 : 31 (+31) bytes in 1 (+1) blocks 81 newarray : 32 (+32) bytes in 1 (+1) blocks 82 multipleinheritance: 48 (+48) bytes in 2 (+2) blocks 83 suppressed: 0 (+0) bytes in 0 (+0) blocks 84 To see details of leaked memory, give 'full' arg to leak_check 85 86 leak_check summary heuristics all 87 LEAK SUMMARY: 88 definitely lost: 8 (+0) bytes in 1 (+0) blocks 89 indirectly lost: 0 (+0) bytes in 0 (+0) blocks 90 possibly lost: 0 (+0) bytes in 0 (+0) blocks 91 still reachable: 239 (+0) bytes in 8 (+0) blocks 92 of which reachable via heuristic: 93 stdstring : 80 (+0) bytes in 2 (+0) blocks 94 length64 : 31 (+0) bytes in 1 (+0) blocks 95 newarray : 32 (+0) bytes in 1 (+0) blocks 96 multipleinheritance: 48 (+0) bytes in 2 (+0) blocks 97 suppressed: 0 (+0) bytes in 0 (+0) blocks 98 To see details of leaked memory, give 'full' arg to leak_check 99 100 leak_check summary heuristics none 101 LEAK SUMMARY: 102 definitely lost: 8 (+0) bytes in 1 (+0) blocks 103 indirectly lost: 0 (+0) bytes in 0 (+0) blocks 104 possibly lost: 191 (+191) bytes in 6 (+6) blocks 105 still reachable: 48 (-191) bytes in 2 (-6) blocks 106 of which reachable via heuristic: 107 stdstring : 0 (-80) bytes in 0 (-2) blocks 108 length64 : 0 (-31) bytes in 0 (-1) blocks 109 newarray : 0 (-32) bytes in 0 (-1) blocks 110 multipleinheritance: 0 (-48) bytes in 0 (-2) blocks 111 suppressed: 0 (+0) bytes in 0 (+0) blocks 112 To see details of leaked memory, give 'full' arg to leak_check 113 114 Searching for pointers pointing in 20 bytes from 0x........ 115 *0x........ interior points at 8 bytes inside 0x........ 116 Address 0x........ is 0 bytes inside data symbol "ptr" 117 block at 0x........ considered reachable by ptr 0x........ using newarray heuristic 118 destruct MyClass 119 destruct MyClass 120 destruct MyClass 121 destruct Ce 122 destruct Be 123 destruct Ae 124 destruct Ce 125 destruct Be 126 destruct Ae 127 destruct C 128 destruct B 129 destruct A 130 destruct C 131 destruct B 132 destruct A 133 Finished! 134 135 HEAP SUMMARY: 136 in use at exit: 0 bytes in 0 blocks 137 total heap usage: 9 allocs, 9 frees, 247 bytes allocated 138 139 All heap blocks were freed -- no leaks are possible 140 141 For counts of detected and suppressed errors, rerun with: -v 142 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) 143