一.检测内存用到的方法
1. 使用系统的僵尸指针检测方式 product->scheme->edit scheme->run->diagnostics->zombie objects

1.检测内存泄露用到的方法(CF CG的类需要手动释放)
1.静态检测方法(手动,自动)
1.手动系统的静态分析工具 product->Analyse
2.自动静态分析工具 build setting -> analyze during 'build' ->YES

2.动态检测方法(instrument,第三方内存检测工具MLeaksFinder)
MLeaksFinder原理 通过runtime交换VC的viewWillAppear ,viewWilldisAppear 监听VC被pop的时候,有没有被delloc,如果走了dissAppear,但是没走delloc就说明内存泄露了