{"id":3506,"date":"2011-06-15T20:27:45","date_gmt":"2011-06-16T01:27:45","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=3506"},"modified":"2014-01-31T17:30:26","modified_gmt":"2014-01-31T22:30:26","slug":"automatic-reference-counting","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2011\/06\/15\/automatic-reference-counting\/","title":{"rendered":"Automatic Reference Counting"},"content":{"rendered":"<p>Apple has now posted some <a href=\"http:\/\/clang.llvm.org\/docs\/AutomaticReferenceCounting.html\">ARC documentation<\/a>. I love the idea of full garbage collection in principle: less code, fewer crashes, and potentially higher performance. However, due to backward compatibility, iOS, and concerns about bugs in the system frameworks, I have so far only adopted it in a few plug-ins. Automatic reference counting seems to promise the same three benefits to a slightly lesser extent, plus lower memory use, and without the drawbacks. (And the deterministic behavior seems to work very well in Python.) So I think this is a good direction for Objective-C. Overall, though, I tend to agree with <a href=\"http:\/\/twitter.com\/#!\/andrewabernathy\/status\/81147865237434368\">Andrew Abernathy<\/a>:<\/p>\r\n<blockquote cite=\"http:\/\/twitter.com\/#!\/andrewabernathy\/status\/81147865237434368\"><p>From my perspective, most obj-c devs think manual ref counting problems overblown, problems of alternatives under-appreciated.<\/p><\/blockquote>\r\n<p>Between autorelease pools and accessors, I don&rsquo;t have to think about memory management much, and it has not tended to be where I write my bugs.<\/p>\r\n<p>Update (2011-06-16): Lots of good information from Apple&rsquo;s <a href=\"http:\/\/lists.apple.com\/archives\/objc-language\/2011\/Jun\/msg00013.html\">Chris Lattner<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Apple has now posted some ARC documentation. I love the idea of full garbage collection in principle: less code, fewer crashes, and potentially higher performance. However, due to backward compatibility, iOS, and concerns about bugs in the system frameworks, I have so far only adopted it in a few plug-ins. Automatic reference counting seems to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[55,571,54,71],"class_list":["post-3506","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-arc","tag-memory-management","tag-objective-c","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=3506"}],"version-history":[{"count":8,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3506\/revisions"}],"predecessor-version":[{"id":8411,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/3506\/revisions\/8411"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=3506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=3506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=3506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}