【发布时间】:2018-11-13 05:51:27
【问题描述】:
- (nullable id)myObjectAtIndex:(NSUInteger)index{
@autoreleasepool {
id value = nil;
if (index < self.count)
{
value = [self myObjectAtIndex:index];
}
return value;
}
}
我不知道在这里使用 autoreleasepool 的目的。有人可以帮帮我吗?
【问题讨论】:
-
调配一个经常使用的 Foundation 方法?那里的代码足以让我怀疑整个代码库是完整的,完全是垃圾,真的需要重写。
标签: objective-c nsmutablearray swizzling