我应该依靠Clang静态分析仪还是仪器? [英] Should I rely on Clang Static Analyser or Instruments?

查看:71
本文介绍了我应该依靠Clang静态分析仪还是仪器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发iPhone应用程序.

I am working on iPhone application..

出于发现内存泄漏的目的,我使用了很多泄漏的仪器启动了该应用程序.后来在某个地方的论坛上我听不懂,我已经读到仪器有时会产生虚假泄漏,因此我应该从静力分析开始.

For the purpose of finding memory leaks I have started the application with the instruments which gave me lots of leaks . which i was unable to understand then in a forum somewhere I have read that the instruments gives spurious leaks sometime so I should start by the Static analysis .

然后,我使用了Clang Static分析器,从静态分析的角度解决了我的应用程序没有错误后,它只给了我7个错误.

Then I have used Clang Static analyser and it gave me only 7 bugs after solving that my app was bug free from the view of Static analysis .

两个分析泄漏都不相同.

Both analysis leaks were different .

如果我仍然使用仪器进行测试,它仍然会泄漏.

If I still test with instruments it still gives leaks .

所以我的问题是我应该依靠clang Static Analyzer结果还是Instruments 结果..

So my question is that should I rely on the clang Static Analyzer results or Instruments results ..

推荐答案

它们是互补的工具,可以通过两种截然不同的方式发现代码中的问题.您应该同时使用.

They're complimentary tools that spot problems in your code in two very different ways. You should use both.

这篇关于我应该依靠Clang静态分析仪还是仪器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆