The app will enter notifications and foreground memory

I add my View Controller as a listener in the UIApplicationWillEnterForegroundNotification in my viewDidLoad function (as recommended in previous questions here):

 if(&UIApplicationWillEnterForegroundNotification != nil) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myFunc) name:UIApplicationWillEnterForegroundNotification object:nil]; } } 

The problem is that when debugging an application through tools, a line of code appears that is extremely memory intensive. Any thoughts on why and how to make it more effective?

+4
source share

Source: https://habr.com/ru/post/1347843/


All Articles