{"id":160,"date":"2020-02-18T00:08:14","date_gmt":"2020-02-17T15:08:14","guid":{"rendered":"https:\/\/blog.daymore.com\/?p=160"},"modified":"2020-02-18T00:08:14","modified_gmt":"2020-02-17T15:08:14","slug":"autoreleasepool","status":"publish","type":"post","link":"https:\/\/blog.daymore.com\/?p=160","title":{"rendered":"autoreleasepool"},"content":{"rendered":"\n<p>\uc2a4\uc704\ud504\ud2b8\ub294 \uaf64 \uc815\uad50\ud558\uace0 \ud6a8\uc728\uc801\uc778 \uba54\ubaa8\ub9ac \uad00\ub9ac\ub97c \ud55c\ub2e4\uace0 \uc54c\ub824\uc838 \uc788\uc9c0\ub9cc \uc0c1\ud669\uc5d0 \ub530\ub77c\uc11c \ud504\ub85c\uadf8\ub798\uba38\uc758 \uc758\ub3c4\uc640 \uc804\ud600 \ub2e4\ub974\uac8c \ub3d9\uc791\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. <\/p>\n\n\n\n<p>\ub2e4\uc74c\uc740 \ub514\ube44\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uac00\uc838\uc640\uc11c \uc0ac\uc9c4\uac2f\uc218\ub97c \ud45c\uc2dc\ud558\ub294 \ucf54\ub4dc\uc778\ub370 \ub370\uc774\ud130\uc758 \uac2f\uc218\uac00 \ub9e4\uc6b0 \ub9ce\uc744 \uacbd\uc6b0 \uc571 \uba54\ubaa8\ub9ac \uc0ac\uc6a9\ub7c9 \ucd08\uacfc\ub85c \ud06c\ub798\uc2dc\uac00 \ubc1c\uc0dd\ud569\ub2c8\ub2e4. \ub354 \uc88b\uc9c0 \uc54a\uc740\uac74 \ud06c\ub798\uc2dc \ubc1c\uc0dd \ub85c\uadf8\ub9cc \ubd10\uc11c\ub294 \uba54\ubaa8\ub9ac \uc0ac\uc6a9\ub7c9 \ucd08\uacfc\ub85c OS\uac00 \uac15\uc81c\ub85c \uc571\uc744 \uc8fd\uc774\ub294 \uc0c1\ud669\uc744 \uc54c \uc218\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. \uc544\ub798 \ub8e8\ud504\uc5d0\uc11c \uc2a4\uc704\ud504\ud2b8\ub294 \ub8e8\ud504\uac00 \uc885\ub8cc\ub420 \ub54c\uae4c\uc9c0 \uc0ac\uc9c4 \ub370\uc774\ud130 \uba54\ubaa8\ub9ac\ub97c \ud574\uc81c\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. for \ub8e8\ud504\uac00 \ubaa8\ub450 \uc885\ub8cc\ub41c \ud6c4\uc5d0 \uc0ac\uc9c4 \ub370\uc774\ud130\uc758 \uba54\ubaa8\ub9ac\ub97c \ud574\uc81c\ud569\ub2c8\ub2e4. (ARC \ud658\uacbd)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">extension Entry {\n    var _photoCount: Int {\n        get {\n            if let __photos = photos {\n                do {\n                    let ps = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(__photos) as? [[String:Any?]]\n                    let count = ps?.count ?? 0\n                    return count\n                } catch {\n                }\n            }\n            return 0\n        }\n    }\n}\n\n\nvar photoCount = 0\nif let entrys = Fetch.entry([:]) {\n    for e in entry {\n        photoCount += e._photoCount\n    }\n}<\/pre>\n\n\n\n<p>\ud504\ub85c\uadf8\ub798\uba38\uac00 \uc6d0\ud558\ub294 \ubc14\ub294 for \ub8e8\ud504\uac00 \uc885\ub8cc\ub420 \ub54c \uc77c\uad04\uc801\uc778 \uba54\ubaa8\ub9ac \ud574\uc81c\uac00 \uc544\ub2cc \uc0ac\uc9c4\uc758 \uac2f\uc218\ub97c \uc77d\uc740 \ud6c4 \ub370\uc774\ud130\uc758 \uba54\ubaa8\ub9ac \ud574\uc81c\ub97c \uc6d0\ud560 \uac81\ub2c8\ub2e4. \uc774 \ub54c autoreleasepool\uc744 \uc0ac\uc6a9\ud558\uba74 \ub429\ub2c8\ub2e4. \uc544\ub798\ucc98\ub7fc autoreleasepool \ud0a4\uc6cc\ub4dc\ub97c \ucd94\uac00\ud558\uc5ec autoreleasepool \uc774 \ud574\uc81c\ub420 \ub54c \ud568\uaed8 \ud574\uc81c\ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var _photoCount: Int {\n    get {\n        autoreleasepool {\n            if let __photos = photos {\n                do {\n                    let ps = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(__photos) as? [[String:Any?]]\n                    let count = ps?.count ?? 0\n                    return count\n                } catch {\n                }\n            }\n            return 0\n        } \/\/\uc774 \ub54c ps\uac00 \uac00\ub9ac\ud0a4\uace0 \uc788\ub294 \uba54\ubaa8\ub9ac\ub3c4 \ud568\uaed8 \ud574\uc81c\ub428\n    }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc2a4\uc704\ud504\ud2b8\ub294 \uaf64 \uc815\uad50\ud558\uace0 \ud6a8\uc728\uc801\uc778 \uba54\ubaa8\ub9ac \uad00\ub9ac\ub97c \ud55c\ub2e4\uace0 \uc54c\ub824\uc838 \uc788\uc9c0\ub9cc \uc0c1\ud669\uc5d0 \ub530\ub77c\uc11c \ud504\ub85c\uadf8\ub798\uba38\uc758 \uc758\ub3c4\uc640 \uc804\ud600 \ub2e4\ub974\uac8c \ub3d9\uc791\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \ub514\ube44\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uac00\uc838\uc640\uc11c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[34,17,21],"class_list":["post-160","post","type-post","status-publish","format-standard","hentry","category-swift","tag-autoreleasepool","tag-swift","tag-21"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>autoreleasepool - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.daymore.com\/?p=160\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"autoreleasepool - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\" \/>\n<meta property=\"og:description\" content=\"\uc2a4\uc704\ud504\ud2b8\ub294 \uaf64 \uc815\uad50\ud558\uace0 \ud6a8\uc728\uc801\uc778 \uba54\ubaa8\ub9ac \uad00\ub9ac\ub97c \ud55c\ub2e4\uace0 \uc54c\ub824\uc838 \uc788\uc9c0\ub9cc \uc0c1\ud669\uc5d0 \ub530\ub77c\uc11c \ud504\ub85c\uadf8\ub798\uba38\uc758 \uc758\ub3c4\uc640 \uc804\ud600 \ub2e4\ub974\uac8c \ub3d9\uc791\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \ub514\ube44\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uac00\uc838\uc640\uc11c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.daymore.com\/?p=160\" \/>\n<meta property=\"og:site_name\" content=\"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-17T15:08:14+00:00\" \/>\n<meta name=\"author\" content=\"daymore\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"daymore\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.daymore.com\/?p=160\",\"url\":\"https:\/\/blog.daymore.com\/?p=160\",\"name\":\"autoreleasepool - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\",\"isPartOf\":{\"@id\":\"https:\/\/blog.daymore.com\/#website\"},\"datePublished\":\"2020-02-17T15:08:14+00:00\",\"author\":{\"@id\":\"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.daymore.com\/?p=160#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.daymore.com\/?p=160\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.daymore.com\/?p=160#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.daymore.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"autoreleasepool\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.daymore.com\/#website\",\"url\":\"https:\/\/blog.daymore.com\/\",\"name\":\"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\",\"description\":\"blog.daymore.com\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.daymore.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763\",\"name\":\"daymore\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/blog.daymore.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g\",\"caption\":\"daymore\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"autoreleasepool - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.daymore.com\/?p=160","og_locale":"ko_KR","og_type":"article","og_title":"autoreleasepool - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","og_description":"\uc2a4\uc704\ud504\ud2b8\ub294 \uaf64 \uc815\uad50\ud558\uace0 \ud6a8\uc728\uc801\uc778 \uba54\ubaa8\ub9ac \uad00\ub9ac\ub97c \ud55c\ub2e4\uace0 \uc54c\ub824\uc838 \uc788\uc9c0\ub9cc \uc0c1\ud669\uc5d0 \ub530\ub77c\uc11c \ud504\ub85c\uadf8\ub798\uba38\uc758 \uc758\ub3c4\uc640 \uc804\ud600 \ub2e4\ub974\uac8c \ub3d9\uc791\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \ub514\ube44\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uac00\uc838\uc640\uc11c [&hellip;]","og_url":"https:\/\/blog.daymore.com\/?p=160","og_site_name":"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","article_published_time":"2020-02-17T15:08:14+00:00","author":"daymore","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"daymore"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.daymore.com\/?p=160","url":"https:\/\/blog.daymore.com\/?p=160","name":"autoreleasepool - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","isPartOf":{"@id":"https:\/\/blog.daymore.com\/#website"},"datePublished":"2020-02-17T15:08:14+00:00","author":{"@id":"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763"},"breadcrumb":{"@id":"https:\/\/blog.daymore.com\/?p=160#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.daymore.com\/?p=160"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.daymore.com\/?p=160#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.daymore.com\/"},{"@type":"ListItem","position":2,"name":"autoreleasepool"}]},{"@type":"WebSite","@id":"https:\/\/blog.daymore.com\/#website","url":"https:\/\/blog.daymore.com\/","name":"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","description":"blog.daymore.com","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.daymore.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763","name":"daymore","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/blog.daymore.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g","caption":"daymore"}}]}},"_links":{"self":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts\/160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=160"}],"version-history":[{"count":1,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts\/160\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts\/160\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}