{"id":593,"date":"2018-02-23T23:40:16","date_gmt":"2018-02-23T15:40:16","guid":{"rendered":"http:\/\/60.205.208.74\/2018\/02\/23\/ios%e5%86%85%e5%ad%98%e7%ae%a1%e7%90%86\/"},"modified":"2018-02-23T23:40:16","modified_gmt":"2018-02-23T15:40:16","slug":"ios%e5%86%85%e5%ad%98%e7%ae%a1%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.puzi7.net\/?p=593","title":{"rendered":"iOS\u5185\u5b58\u7ba1\u7406"},"content":{"rendered":"<span itemprop=\"description\"><div class=\"article-body\">\n<div class=\"article-intro\" id=\"content\">\n<h1>IOS\u5185\u5b58\u7ba1\u7406<\/h1>\n<hr>\n<h2>\u7b80\u4ecb<\/h2>\n<p>iOS\u4e0b\u5185\u5b58\u7ba1\u7406\u7684\u57fa\u672c\u601d\u60f3\u5c31\u662f\u5f15\u7528\u8ba1\u6570\uff0c\u901a\u8fc7\u5bf9\u8c61\u7684\u5f15\u7528\u8ba1\u6570\u6765\u5bf9\u5185\u5b58\u5bf9\u8c61\u7684\u751f\u547d\u5468\u671f\u8fdb\u884c\u63a7\u5236\u3002\u5177\u4f53\u5230\u7f16\u7a0b\u65f6\u95f4\u65b9\u9762\uff0c\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a<\/p>\n<p>1\uff1aMRR\uff08manual retain-release\uff09\uff0c\u4eba\u5de5\u5f15\u7528\u8ba1\u6570\uff0c\u5bf9\u8c61\u7684\u751f\u6210\u3001\u9500\u6bc1\u3001\u5f15\u7528\u8ba1\u6570\u7684\u53d8\u5316\u90fd\u662f\u7531\u5f00\u53d1\u4eba\u5458\u6765\u5b8c\u6210\u3002<\/p>\n<p>2\uff1aARC\uff08Automatic Reference Counting\uff09\uff0c\u81ea\u52a8\u5f15\u7528\u8ba1\u6570\uff0c\u53ea\u8d1f\u8d23\u5bf9\u8c61\u7684\u751f\u6210\uff0c\u5176\u4ed6\u8fc7\u7a0b\u5f00\u53d1\u4eba\u5458\u4e0d\u518d\u9700\u8981\u5173\u5fc3\u5176\u9500\u6bc1\uff0c\u4f7f\u7528\u65b9\u5f0f\u7c7b\u4f3c\u4e8e\u5783\u573e\u56de\u6536\uff0c\u4f46\u5176\u5b9e\u8d28\u8fd8\u662f\u5f15\u7528\u8ba1\u6570\u3002<\/p>\n<h3>\u9762\u4e34\u7684\u95ee\u9898<\/h3>\n<p>\u6839\u636e\u82f9\u679c\u8bf4\u660e\u6587\u6863\uff0c\u9762\u4e34\u7684\u4e24\u4e2a\u4e3b\u8981\u95ee\u9898\u662f\uff1a<\/p>\n<p>\u91ca\u653e\u6216\u8986\u76d6\u7684\u6570\u636e\u4ecd\u7136\u5728\u4f7f\u7528\u3002\u8fd9\u5c06\u9020\u6210\u5185\u5b58\u635f\u574f\uff0c\u901a\u5e38\u5728\u5e94\u7528\u7a0b\u5e8f\u5d29\u6e83\uff0c\u6216\u8005\u66f4\u7cdf\uff0c\u635f\u574f\u7528\u6237\u6570\u636e\u3002<\/p>\n<p>\u4e0d\u91ca\u653e\u4e0d\u518d\u4f7f\u7528\u7684\u6570\u636e\u4f1a\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f\u3002\u5206\u914d\u7684\u5185\u5b58\uff0c\u5185\u5b58\u6cc4\u6f0f\u4e0d\u4f1a\u91ca\u653e\uff0c\u5373\u4f7f\u5b83\u4ece\u6765\u6ca1\u6709\u518d\u6b21\u4f7f\u7528\u3002\u6cc4\u6f0f\u4f1a\u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u7684\u5185\u5b58\u4f7f\u7528\u91cf\u65e5\u76ca\u589e\u52a0\uff0c\u8fd9\u53cd\u8fc7\u6765\u53c8\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7cfb\u7edf\u6027\u80fd\u8f83\u5dee\u6216\u6b7b\u673a\u3002<\/p>\n<h3>\u5185\u5b58\u7ba1\u7406\u89c4\u5219<\/h3>\n<p>\u6211\u4eec\u521b\u5efa\u81ea\u5df1\u7684\u5bf9\u8c61\uff0c\u5f53\u4ed6\u4eec\u4e0d\u518d\u9700\u8981\u7684\u65f6\u5019\uff0c\u91ca\u653e\u4ed6\u4eec\u3002<\/p>\n<p>\u4fdd\u7559\u9700\u8981\u4f7f\u7528\u7684\u5bf9\u8c61\u3002\u5982\u679c\u6ca1\u6709\u5fc5\u8981\u5fc5\u987b\u91ca\u653e\u8fd9\u4e9b\u5bf9\u8c61\u3002<\/p>\n<p>\u4e0d\u8981\u91ca\u653e\u6211\u4eec\u6ca1\u6709\u62e5\u6709\u7684\u5bf9\u8c61\u3002<\/p>\n<h3>\u4f7f\u7528\u5185\u5b58\u7ba1\u7406\u5de5\u5177<\/h3>\n<p>\u53ef\u4ee5\u7528Xcode\u5de5\u5177\u4eea\u5668\u7684\u5e2e\u52a9\u4e0b\u5206\u6790\u5185\u5b58\u7684\u4f7f\u7528\u60c5\u51b5\u3002\u5b83\u5305\u62ec\u7684\u5de5\u5177\u6709\u6d3b\u52a8\u76d1\u89c6\u5668\uff0c\u5206\u914d\uff0c\u6cc4\u6f0f\uff0c\u50f5\u5c38\u7b49<\/p>\n<h3>\u5206\u6790\u5185\u5b58\u5206\u914d\u7684\u6b65\u9aa4<\/h3>\n<p>1. \u6253\u5f00\u4e00\u4e2a\u73b0\u6709\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>2. \u9009\u62e9\u4ea7\u54c1\uff0c\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\u6240\u793a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full\" alt=\"mm_Profile\" src=\"http:\/\/www.runoob.com\/wp-content\/uploads\/2013\/11\/mm_Profile.jpg\" width=\"560\" height=\"376\" data-pinit=\"registered\"><\/p>\n<p>3.\u5728\u4ee5\u4e0b\u754c\u9762\u4e2d\u9009\u62e9 Allocations \u548c Profile\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full\" alt=\"mm_ProfileSelect\" src=\"http:\/\/www.runoob.com\/wp-content\/uploads\/2013\/11\/mm_ProfileSelect.jpg\" width=\"560\" height=\"462\" data-pinit=\"registered\"><\/p>\n<p>4. \u6211\u4eec\u53ef\u4ee5\u770b\u5230\u4e0d\u540c\u5bf9\u8c61\u7684\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<\/p>\n<p>5. \u4f60\u53ef\u4ee5\u5207\u6362\u89c6\u56fe\u63a7\u5236\u5668\u67e5\u770b\u5185\u5b58\u662f\u5426\u91ca\u653e\u3002\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full\" alt=\"mm_Instruments_Allocations\" src=\"http:\/\/www.runoob.com\/wp-content\/uploads\/2013\/11\/mm_Instruments_Allocations.jpg\" width=\"560\" height=\"399\" data-pinit=\"registered\"><\/p>\n<p>6.\u540c\u6837\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 Activity Monitor \u6765\u67e5\u770b\u5185\u5b58\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u5206\u914d\u7684\u60c5\u51b5\u3002\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full\" alt=\"mm_Instruments_ActivityMonitor\" src=\"http:\/\/www.runoob.com\/wp-content\/uploads\/2013\/11\/mm_Instruments_ActivityMonitor.jpg\" width=\"560\" height=\"397\" data-pinit=\"registered\"><\/p>\n<p>7. \u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u4e86\u89e3\u5185\u5b58\u7684\u4f7f\u7528\u60c5\u51b5\u53ca\u5728\u4ec0\u4e48\u5730\u65b9\u53ef\u80fd\u53d1\u751f\u6cc4\u6f0f\u3002<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<span>","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\"><span itemprop=\"description\">IOS\u5185\u5b58\u7ba1\u7406 \u7b80\u4ecb iOS\u4e0b\u5185\u5b58\u7ba1\u7406\u7684\u57fa\u672c\u601d\u60f3\u5c31\u662f\u5f15\u7528\u8ba1\u6570\uff0c\u901a\u8fc7\u5bf9\u8c61\u7684\u5f15\u7528\u8ba1\u6570\u6765\u5bf9\u5185\u5b58\u5bf9&hellip;<\/span><\/p>\n<p class=\"more-link-p btn-align-right\"><a class=\"green zoom-btn\" href=\"https:\/\/www.puzi7.net\/?p=593\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,26],"tags":[74,93],"class_list":["post-593","post","type-post","status-publish","format-standard","hentry","category-ios","category-mobile","tag-ios","tag-mobile","zoom-theme-has-thumb"],"_links":{"self":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=593"}],"version-history":[{"count":0,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/593\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}