简体   繁体   English

objective-c单例内存释放

[英]objective-c singleton memory deallocation

如果没有使用垃圾收集器(iPhone环境),当我的应用程序终止时,我应该以某种方式释放共享对象(单身基于哪个)?

When an application exits, all its memory is released. 当应用程序退出时,将释放其所有内存。 So it really does not matter if you release objects at all, so long as you don't use too much memory while running. 因此,只要你在运行时不使用太多内存,那么释放对象真的无关紧要。

Even when the strategy changes in 4.0, a single small object won't have much impact; 即使策略在4.0中发生变化,单个小对象也不会产生太大影响; it will still be released along with the rest of the application when it terminates. 当它终止时,它仍将与应用程序的其余部分一起发布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM