I'm adding my View Controller as a listener to UIApplicationWillEnterForegroundNotification
in my viewDidLoad
function (as recommended on previous questions here):
if(&UIApplicationWillEnterForegroundNotification != nil)
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myFunc) name:UIApplicationWillEnterForegroundNotification object:nil];
}
}
The problem is that when debugging the application through Instruments it appears this line of code is extremely memory consuming. Any thoughts as to why and how to make it more effective?