valgrind使用指南

一、內存泄露檢測 文件test_valgrind.cpp #include <iostream>   int main() { int* a = NULL; a = new int[10]; return 0; }   g++ -g test_valgrind.cpp   valgrind --leak-check=yes ./a.out   輸出如下: 從上圖可以看出,有40bytes的內存尚未
相關文章
相關標籤/搜索