开发者

iPhone: How to fix a legacy iPhone app which has really bad memory management? unittesting?

I recently inherited an iPhone app. The original developer did not understand memory management and well the app works in simlulator but not in on old iPhone (lots of crashses开发者_Python百科). Do you have any thoughts on the process by which I can save the app?

Can I utilize or create any unittest to find memory leaks and make the process 'scientific'?

Thanks


Yes! Use Clang! Here is a good tutorial showing the benefits: http://iphonedevelopment.blogspot.com/2009/02/clang-static-analyzer.html

However, it should be installed if you have a newer SDK.


Since the Clang Static Analyzer is now built-in to Xcode on Snow Leopard, it's trivial to use it. Select Build -> Build & Analyze to see any memory problems Clang detects (hint: it will find pretty much all of them).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜