iDev

iOS 개발 Retain, Release 로 부터 Release (해방) 되다!

KraZYeom 2011. 6. 8. 20:49
반응형
충격과 공포로 몰아 넣었던 Retain, Release 가 Project Building Setting 에서 
기본 컴파일러를 Apple LLVC compiler 3.0 으로 선택을 하고 
Objective-C automatic Reference Counting 값을 Yes 로 하면


release 에 빨간 줄이 뜹니다. 

release 메소드가 deprecated 되었습니다. ㅠㅠb 충격.


애플 공식 iOS5 소개에 보면 간략한 설명이 나와있네요. 
http://developer.apple.com/technologies/ios5/
 

Automatic Reference Counting

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.

 
메모리 메니징을 컴파일러에서 오브젝트를 분석해서 retain 과 release를 알아서 관리 해줍니다.
개발은 더욱더 쉬워지고... 메모리 관리 문제로 생긴 크레쉬와 누수를 줄여주네요. ㅠㅠb

OSX App 개발은 그나마 GC가 있어서 메모리 관리가 그나마 쉬웠는데..
iOS 개발의 최대의 걸림돌이 하나 제거 된 듯 합니다. ㅠㅠb

만쉐~~~ -ㅁ-; 

정보를 주신 @kiding0 동성님께 감사를!! :-) 
 
반응형