【发布时间】:2014-04-01 01:07:02
【问题描述】:
我使用 NSURLConnection 在服务器 NSURLConnection 上发送请求,由于内存不足,增加了缓存和应用程序崩溃。 我使用此代码清除缓存:
[[NSURLCache sharedURLCache] removeAllCachedResponses];
但在 iOS 7 中,此代码不再起作用。有人知道如何清除缓存吗?
【问题讨论】:
-
你可以通过在xcode中点击edit->refractor->convert to arc来将你的代码转换为arc。然后尝试使用相同的代码。
-
我在我的项目中使用了 ARC 不支持的第三方库。
-
将项目转换为 ARC 是我的最后选择
-
可以从arc中排除第三方库,参考:stackoverflow.com/questions/8040629/…
-
很遗憾我也用这个,参考stackoverflow.com/questions/6646052/…
标签: ios objective-c caching memory ios7