{"id":986,"date":"2016-07-22T19:40:46","date_gmt":"2016-07-22T10:40:46","guid":{"rendered":"http:\/\/www.chihayafuru.jp\/tech\/?p=986"},"modified":"2017-02-13T14:22:43","modified_gmt":"2017-02-13T05:22:43","slug":"gcdground-central-dispatch%e3%81%ae%e3%83%a1%e3%83%a2%e3%83%aa%e7%ae%a1%e7%90%86%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/986","title":{"rendered":"GCD(Ground Central Dispatch)\u306e\u30e1\u30e2\u30ea\u7ba1\u7406\u65b9\u6cd5"},"content":{"rendered":"<table>\n<tbody>\n<tr>\n<th>Deployment Target<\/th>\n<th>\u30e1\u30e2\u30ea\u7ba1\u7406\u65b9\u6cd5<\/th>\n<\/tr>\n<tr>\n<td>iOS6\u672a\u6e80<\/td>\n<td>ARC\u7ba1\u7406\u5916<\/td>\n<\/tr>\n<tr>\n<td>iOS6\u4ee5\u4e0a<\/td>\n<td>ARC\u7ba1\u7406\u4e0b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h3>iOS6\u672a\u6e80(ARC\u7ba1\u7406\u5916)\u3068iOS6\u4ee5\u4e0a(ARC\u7ba1\u7406\u4e0b)\u306e\u4e21\u65b9\u306e\u74b0\u5883\u306b\u5bfe\u5fdc\u3055\u305b\u305f\u30b3\u30fc\u30c9\u4f8b<\/h3>\n<pre class=\"lang:objc decode:true \" >@interface Foo()\r\n\r\n#if OS_OBJECT_USE_OBJC\r\n@property (nonatomic, strong) dispatch_semaphore_t semaphore;\r\n#else\r\n@property (nonatomic, assign) dispatch_semaphore_t semaphore;\r\n#endif\r\n\r\n@end\r\n\r\n\r\n@implementation Foo\r\n\r\n- (id)init\r\n{\r\n    self = [super init];\r\n    if (self) {\r\n        _semaphore = dispatch_semaphore_create(1);\r\n    }\r\n    return self;\r\n}\r\n\r\n- (void)dealloc\r\n{\r\n#if !OS_OBJECT_USE_OBJC\r\n    dispatch_release(self.semaphore);\r\n#endif\r\n    \/\/ [super dealloc]; \u306f ARC \u304c\u81ea\u52d5\u7684\u306b\u633f\u5165\u3059\u308b\r\n}\r\n\r\n@end<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Deployment Target \u30e1\u30e2\u30ea\u7ba1\u7406\u65b9\u6cd5 iOS6\u672a\u6e80 ARC\u7ba1\u7406\u5916 iOS6\u4ee5\u4e0a ARC\u7ba1\u7406\u4e0b<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[7],"class_list":["post-986","post","type-post","status-publish","format-standard","hentry","category-memo","tag-ios"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":9,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":996,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/986\/revisions\/996"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}