{"id":5498,"date":"2012-07-31T23:17:39","date_gmt":"2012-08-01T04:17:39","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=5498"},"modified":"2012-08-01T09:24:13","modified_gmt":"2012-08-01T14:24:13","slug":"notification-gotchas","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2012\/07\/31\/notification-gotchas\/","title":{"rendered":"Notification Gotchas"},"content":{"rendered":"<p><a href=\"http:\/\/weblog.bignerdranch.com\/780-notifications-part-3-gotchas\/\">Mark Dalrymple<\/a>:<\/p>\n<blockquote cite=\"http:\/\/weblog.bignerdranch.com\/780-notifications-part-3-gotchas\/\"><p>Notice that <code>self<\/code> is explicitly referenced inside of the block.  <code>self<\/code> can also be referenced implicitly by accessing an instance variable. By default, blocks capture variables read-only, and objects are retained.  Therefore <code>self<\/code> is retained, and we&rsquo;re in a retain cycle situation.<\/p><\/blockquote>\n<p>That API was simpler with garbage collection.<\/p>","protected":false},"excerpt":{"rendered":"<p>Mark Dalrymple: Notice that self is explicitly referenced inside of the block. self can also be referenced implicitly by accessing an instance variable. By default, blocks capture variables read-only, and objects are retained. Therefore self is retained, and we&rsquo;re in a retain cycle situation. That API was simpler with garbage collection.<\/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":[],"class_list":["post-5498","post","type-post","status-publish","format-standard","hentry","category-programming-category"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/5498","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=5498"}],"version-history":[{"count":4,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/5498\/revisions"}],"predecessor-version":[{"id":5510,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/5498\/revisions\/5510"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=5498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=5498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=5498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}