1. 不基于 一个 UI框架 例如 a command-line tool。
2. 循环创建许多临时对象。使用 autorelease pool blocks 减少应用程序最大内存占用。
3.生成一个辅助线程。
You must create your own autorelease pool block as soon as the thread begins executing; otherwise, your application will leak objects. (See Autorelease Pool Blocks and Threads for details.)
自动释放池 资料链接
转载请注明原文地址: https://ju.6miu.com/read-962307.html