2019独角兽企业重金招聘Python工程师标准>>>
valgrind: Use --help for more information.
shz@shz-virtual-machine:/mnt/hgfs/share_test/test_cpp_cmake/bat$ ./run_debug.sh ==17310== Memcheck, a memory error detector
==17310== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==17310== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==17310== Command: ./test_cpp //执行的程序
==17310==
//运行结果
A();
//
==17310==
==17310== HEAP SUMMARY:
==17310== in use at exit: 72,704 bytes in 1 blocks
==17310== total heap usage: 4 allocs, 3 frees, 74,753 bytes allocated
==17310==
==17310== LEAK SUMMARY:
//确认丢失 要修复
==17310== definitely lost: 0 bytes in 0 blocks
//间接丢失 当使用了含有指针成员的类或结构时可能会报这个错误。
==17310== indirectly lost: 0 bytes in 0 blocks
//可能丢失
==17310== possibly lost: 0 bytes in 0 blocks
//可以访问,未丢失但也未释放
==17310== still reachable: 72,704 bytes in 1 blocks
==17310== suppressed: 0 bytes in 0 blocks
==17310== Reachable blocks (those to which a pointer was found) are not shown.
==17310== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==17310==
==17310== For counts of detected and suppressed errors, rerun with: -v
==17310== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
shz@shz-virtual-machine:/mnt/hgfs/share_test/test_cpp_cmake/bat$