在h文件中批量创建instance:
IBOutlet UIImageView *imageView;
IBOutlet UIImageView *subImageView;
IBOutlet UIImageView *arrowRight;
IBOutlet UIImageView *arrowLeft;
IBOutlet UIImageView *arrowDown;
程序是ARC模式的。
是否应该在dealloc ()
方法中设置为nil来释放?
谢谢。
如果对象消失后用不到全局变量了,最好的方法是在dealloc将全局指针指向空
- (void)dealloc {
gYourGlobalPointer = nil;
}
在ARC中不能调用[super dealloc]
,dealloc
会自动发送到超级类中。