release method deprecated

↘锁芯ラ 提交于 2019-11-28 14:14:38
Ilanchezhian

If you have enabled the 'ARC', then you don't need to release an object. That will be handled by the compiler. retain, release and autorelease are all handled by the compiler.

Edit: You could know more about that from here

Also there already a SO thread exists. Please go thru that.

To manage memory by yourself go to "build settings" and set the flag "Objective-C automatic reference counting" to "No" (it's under "Apple LLVM compiler")

Automatic Reference Counting (ARC) for Objective-C makes memory management the job of the compiler. By enabling ARC with the new Apple LLVM compiler, you will never need to type retain or release again, dramatically simplifying the development process, while reducing crashes and memory leaks. The compiler has a complete understanding of your objects, and releases each object the instant it is no longer used, so apps run as fast as ever, with predictable, smooth performance.

- iOS 5 for Developers

Consider using ARC (Automatic Retain Counting) for your project. There is a refactoring that will convert a current project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!