Xcode 环境中 Valgrind 的等价物是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5431697/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the equivalent of Valgrind within the Xcode environment?
提问by Eric Brotto
It was recently recommended to me to use Valgrind to check for memory leaks, errors etc. on my iPhone project (which is written mainly in C and Objective-C).
最近有人建议我使用 Valgrind 检查我的 iPhone 项目(主要用 C 和 Objective-C 编写)中的内存泄漏、错误等。
I'm fairly new to this kind of work and was wondering what tools there were in Xcode that would serve the same purpose.
我对这种工作还很陌生,想知道 Xcode 中有哪些工具可以达到同样的目的。
Thanks so much
非常感谢
采纳答案by saadnib
If you want to check memory leaks then you can run your project with performance tool with leaks. Follow the screen shot.
如果您想检查内存泄漏,那么您可以使用带有泄漏的性能工具运行您的项目。按照屏幕截图操作。
回答by David
http://landonf.bikemonkey.org/code/iphone/iPhone_Simulator_Valgrind.20081224.html
http://landonf.bikemonkey.org/code/iphone/iPhone_Simulator_Valgrind.20081224.html
Xcode's "Leaks" tool is not the same thing as Valgrind. Valgrind detects overwriting memory boundaries (amongst other things) in addition to detecting memory leaks.
Xcode 的“泄漏”工具与 Valgrind 不同。除了检测内存泄漏外,Valgrind 还检测覆盖内存边界(除其他外)。