I'm starting to use iOS5 and I've enabled ARC for my project. I have a class where on deallocation I save the state of that object.
-(void)dealloc {
[self save];
[super dealloc];
}
However, under ARC, [super dealloc]
is not allowed? I thought that it was considered a bug if you don't invoke the dealloc method on the super class in this situation?
So what is the app开发者_如何学Goropriate way to dealloc objects now?
ARC in iOS 5 is under NDA. That said, judging from publicly available information at the official site of clang, you just don't write [super dealloc]
. That's generated automatically by the compiler. See the clause 7.1.2 of the specification.
精彩评论