本文介绍了iOS-NSNotificationCenter内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Instruments报告这是一次内存泄漏(98.6%,无论如何):

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

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

"self"是UIImageView的子类.通知中包含"self"会导致内存泄漏吗?如果是这样,您如何解决?

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

推荐答案

更好地检查您的通知查看器.内存泄漏的原因可能在那里.

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

这篇关于iOS-NSNotificationCenter内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 04:10