Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Reference counting
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Cocoa (Objective-C)=== {{See also|Automatic Reference Counting}} Apple's [[Cocoa (API)|Cocoa]] and [[Cocoa Touch]] frameworks (and related frameworks, such as [[Core Foundation]]) use manual reference counting, much like [[Component Object Model|COM]]. Traditionally this was accomplished by the programmer manually sending <code>retain</code> and <code>release</code> messages to objects, but [[Automatic Reference Counting]], a [[Clang]] compiler feature that automatically inserts these messages as needed, was added in [[iOS (Apple)|iOS]] 5<ref>[https://developer.apple.com/technologies/ios5/] {{webarchive|url=https://web.archive.org/web/20110609033837/http://developer.apple.com/technologies/ios5/|date=9 June 2011}}</ref> and [[Mac OS X 10.7]].<ref>{{cite web|url=https://developer.apple.com/library/mac/#releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_7.html#//apple_ref/doc/uid/TP40010355-SW62 |title=Mac Developer Library |publisher=Developer.apple.com |access-date=2015-12-17}}</ref> [[Mac OS X 10.5]] introduced a tracing garbage collector as an alternative to reference counting, but it was deprecated in [[OS X 10.8]] and removed from the Objective-C [[runtime library]] in [[macOS Sierra]].<ref>{{Cite web|url=https://arstechnica.com/apple/2012/07/os-x-10-8/17/#objective-c-enhancements|title=OS X 10.8 Mountain Lion: the Ars Technica review|last=Siracusa|first=John|date=25 July 2012|at=At section "Objective-C enhancements"|access-date=17 November 2016|work=Ars Technica}}</ref><ref>{{Cite web|url=https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html|title=Xcode 8 Release Notes|date=27 October 2016|website=Apple Developer|access-date=19 March 2017|archive-url=https://web.archive.org/web/20170319065518/https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html|archive-date=19 March 2017}}</ref> [[iOS]] has never supported a tracing garbage collector.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)