Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在视图控制器的@private 部分中得到了以下变量,有时 ARC 接缝将其释放到我希望它保留而不被收集的位置。如何?
NSMutableArray* carPictures;
谢谢
没有足够的信息来回答你的问题。尝试将其声明为strong属性,即
strong
@property (nonatomic,strong) NSMutableArray *carPictures;
然后设置变量
self.carPictures = [NSMutableArray array];