【发布时间】:2014-07-31 21:27:15
【问题描述】:
我用c++写了下面一段代码作为xcode命令行工具
int * num = new int[100];
num[4] = 5;
num = NULL;
cout << "leaked" << endl;
string c; cin >> c;
return 0;
但是,当使用带有 Leaks 模板的 Instruments 进行分析时,它不会显示任何内存泄漏,尽管在等待输入时显然应该有一个。
【问题讨论】:
标签: c++ xcode memory-leaks instruments xcode-instruments