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