Skip to content

Commit a183129

Browse files
author
ElonChan
committed
Add reference to CYLDeallocBlockExecutor
1 parent b535de1 commit a183129

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

01《招聘一个靠谱的iOS》面试题参考答案/《招聘一个靠谱的iOS》面试题参考答案(上).md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,8 @@ objc_storeWeak(&obj1, 0);
900900

901901
我们从setter方法入手:
902902

903+
(注意以下的 `cyl_runAtDealloc` 方法实现仅仅用于模拟原理,如果想用于项目中,还需要考虑更复杂的场景,想在实际项目使用的话,可以使用我写的一个小库,可以使用 CocoaPods 在项目中使用: [CYLDeallocBlockExecutor](https://github.com/ChenYilong/CYLDeallocBlockExecutor)
904+
903905
```Objective-C
904906
- (void)setObject:(NSObject *)object
905907
{
@@ -1051,12 +1053,9 @@ NSObject *foo = [[NSObject alloc] init];
10511053
```
10521054
10531055
1056+
如果对 `cyl_runAtDealloc` 的实现原理有兴趣,可以看下我写的一个小库,可以使用 CocoaPods 在项目中使用: [CYLDeallocBlockExecutor](https://github.com/ChenYilong/CYLDeallocBlockExecutor)
10541057
1055-
1056-
1057-
1058-
1059-
如果对 `cyl_runAtDealloc` 的实现原理有兴趣,可以看下这篇博文 [***Fun With the Objective-C Runtime: Run Code at Deallocation of Any Object***](http://stackoverflow.com/a/31560217/3395008)
1058+
参考博文: [***Fun With the Objective-C Runtime: Run Code at Deallocation of Any Object***](http://stackoverflow.com/a/31560217/3395008)
10601059
10611060
10621061
###9. @property中有哪些属性关键字?/ @property 后面可以有哪些修饰符?
@@ -1173,6 +1172,8 @@ void objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id newValue, BOOL ato
11731172
}
11741173
```
11751174

1175+
如果对 `cyl_runAtDealloc` 的实现原理有兴趣,可以看下我写的一个小库,可以使用 CocoaPods 在项目中使用: [CYLDeallocBlockExecutor](https://github.com/ChenYilong/CYLDeallocBlockExecutor)
1176+
11761177

11771178
也即:
11781179

0 commit comments

Comments
 (0)