美文网首页
instrument 使用

instrument 使用

作者: docallsama | 来源:发表于2018-01-22 11:46 被阅读113次

使用instrument真机调试时候遇到没有symbol文件的情况,需要在build setting当中设置debug information format将debug prod修改成为DRAWF 修改为 DRAWF with dSYM File。参见链接

疑问:100次循环 去读一个超大的字符串,然后怎么做,能够让读出来的数据读完就释放掉?

1、 未进行任何处理时,循环100次:
内存占用30.38kb

for循环100次

2、未进行任何处理时,循环10000次:
内存占用3.35Mb=3430kb

for循环10000次

3、在for循环外层加入autoreleasepool,并循环100次:
内存占用33.88kb,autoreleasepool释放后占用2.14kb

循环外autoreleasepool,for循环100次

4、在for循环内层加入autoreleasepool,并循环100次:
内存占用23.02kb

循环内autoreleasepool,for循环100次

5、使用系统提供的enumerateObjectsUsingBlock,进行循环100次,已知enumerateObjectsUsingBlock方法内部自带autorealesepool
内存占用22.66kb

image.png

对比1、2可知:instrument标记的内存allocation是指累计使用的量。

相关文章

  • instrument工具

    instrument使用 参考:Core Animaiton工具内存泄漏检测instrument使用 路径:Xco...

  • instrument 使用

    使用instrument真机调试时候遇到没有symbol文件的情况,需要在build setting当中设置deb...

  • Instrument使用

    关于APP优化,从wwdc内容来看,主要是关注于APP启动时间,CPU耗时操作,电量三个方面对于启动时间,wwdc...

  • ☆浅谈JPDA中JVMTI模块

    0 前言 上一节《Java Instrument 功能使用及原理》文章中,讲解Instrument使用时,简单提了...

  • Instrument的使用

    1.Instrument打开 product->profile打开(command+I) 2.常用功能 Time ...

  • Instrument 的使用

    检测内存泄漏 打开 Instruments 方法一:Xcode > Open Developer Tool > I...

  • instrument的使用

    instrument是Xcode的性能调试工具。路径: Xcode->Open Developer Tools -...

  • instrument工具使用

    instrument工具捕获以下信息: 1、Category(类别) 通常是一个 Core Foundation ...

  • iOS Instrument使用

    1.leaks使用http://www.cnblogs.com/qiutangfengmian/p/6117856...

  • Instrument的使用

    可以看到 Instruments 功能很多,这里先介绍一下我们在开发中常用到的几种:CPU 性能测试、图形性能测试...

网友评论

      本文标题:instrument 使用

      本文链接:https://www.haomeiwen.com/subject/eymaoxtx.html