开发者

Can I "profile" using Instruments for memory leaks using a Test Case? (i.e. focused run on a defined area of code)

Can I "profile" for memory leaks using a Test Case? (i.e. focused run on a defined area of code) I tried changing开发者_Go百科 my profile for my iPhone app to Unit Tests and then noted the "profile" option disappeared.

My goal (requirement) I guess is to be able to isolate a specific method, and then run the Instruments memory leak profiling across this specific method and observe results.


The easiest way to accomplish this is to launch your application in Instrument, wait a little and tap a button that will run the specific method you're looking for.

You can then select the timespan where the method ran by dragging the time bar with the option key.


You can also set a breakpoint in your tests, use Instruments to attach to the process, and then resume. Don't forget to hit Record like I did :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜