iOS性能监测Instruments的使用

iOS性能监测Instruments的使用

1.启动程序点击Show the  Debug navigator ->Memory ->Profile in instruments ->Transfer

iOS性能监测Instruments的使用_第1张图片

这样instruments的Leak就运行起来。检测内存泄露需要我们操作app

iOS性能监测Instruments的使用_第2张图片

出现红叉的时候 说明有内存泄露 点击红叉

iOS性能监测Instruments的使用_第3张图片

选择Call Tree 在勾选

iOS性能监测Instruments的使用_第4张图片

Invert Call Tree和Hide System Libraries后双击内存泄露的位置就可以修改代码了

你可能感兴趣的:(iOS性能监测Instruments的使用)