iOS - NSNotificationCenter memory leak

2019-05-22 14:13发布

Instruments reports this a memory leak (98.6%, whatever that means):

[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationSomeNotification object:self];

"self" is a subclass of UIImageView. Is including "self" in the notification causing a memory leak? If so, how do you resolve it?

2条回答
别忘想泡老子
2楼-- · 2019-05-22 14:43

Better check your notification observer. The cause of memory leak might be there.

查看更多
萌系小妹纸
3楼-- · 2019-05-22 14:46

Memory leaks are almost always it is not safe. Check again are there leakage accurately!? You can do this by using deleaker.

查看更多
登录 后发表回答