【发布时间】:2012-01-15 14:47:34
【问题描述】:
可能重复:
iPhone: helpfulness of didReceiveMemoryWarning:
How to implement didReceiveMemoryWarning?
我想知道这个函数是如何工作的。它调用父类的didReceiveMemoryWarning。但是我不知道这个函数里面写了什么以及它是如何工作的。
【问题讨论】:
可能重复:
iPhone: helpfulness of didReceiveMemoryWarning:
How to implement didReceiveMemoryWarning?
我想知道这个函数是如何工作的。它调用父类的didReceiveMemoryWarning。但是我不知道这个函数里面写了什么以及它是如何工作的。
【问题讨论】:
didReceiveMemoryWarning 在类开始使用过多内存时调用。您可以使用此方法释放不被使用的对象,例如图像、数组、字典等。
【讨论】:
didReceiveMemoryWarning 中的标准代码是 [super didReceiveMemoryWarning];