I reorganized the project into ARC. It looks great, but there is an object that uses the notification center. I removed the observer in the user dealloc method. This worked fine in a project without ARC. It also works in ARC, but I get a crazy warning: "The method may be missing a call [super dealloc]." In an ARC project, this is automatically done for me when the method ends. Even better: I should not call it in ARC projects! It must be an Xcode error, right? Here is my code:
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
I always want to write code that does not throw a warning. Is there a way around this yellow exclamation mark?
source
share