Application Will Enter Foreground Notification and memory
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?
精彩评论