开发者

Application Will Enter Foreground Notification and memory

开发者 https://www.devze.com 2023-02-24 12:16 出处:网络
I\'m adding my View Controller as a listener to UIApplicationWillEnterForegroundNotification in my viewDidLoad function (as recommended on previous 开发者_运维知识库questions here):

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消