(问题)如何彻底清除UIWebView的内存消耗
2014-07-27 22:47
197 查看
// cookie清除
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies])
{
[storage deleteCookie:cookie];
}
// 缓存
清除
// [[NSURLCache sharedURLCache] removeAllCachedResponses];
NSURLCache * cache = [NSURLCache sharedURLCache];
[cache removeAllCachedResponses];
[cache setDiskCapacity:0];
[cache setMemoryCapacity:0];
[_web loadHTMLString:@"" baseURL:nil];
[_web stopLoading];
[_web removeFromSuperview];
_web = nil;
清除cookie和缓存都没有用,只要使用了一个UIWebView就始终占用一定的内存。
跪求解决~~
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies])
{
[storage deleteCookie:cookie];
}
// 缓存
清除
// [[NSURLCache sharedURLCache] removeAllCachedResponses];
NSURLCache * cache = [NSURLCache sharedURLCache];
[cache removeAllCachedResponses];
[cache setDiskCapacity:0];
[cache setMemoryCapacity:0];
[_web loadHTMLString:@"" baseURL:nil];
[_web stopLoading];
[_web removeFromSuperview];
_web = nil;
清除cookie和缓存都没有用,只要使用了一个UIWebView就始终占用一定的内存。
跪求解决~~
相关文章推荐
- C#的数据库应用如何解决内存消耗太大的问题呢?
- WebView内存泄漏,如何让WebView清除更彻底
- WebView内存泄漏,如何让WebView清除更彻底
- 如何解决IBM AIX PowerPath xcryptd进程在AIX主机消耗大量的CPU 和内存资源的问题
- 关于IOS UIWebView内存消耗过高的问题
- C#的数据库应用如何解决内存消耗太大的问题呢?
- 一次异常内存消耗问题的诊断及解决与热点块 (联接地址)
- 如何解决SQL Server占用内存的问题
- 如何诊断和解决CPU高度消耗(100%)的数据库问题
- 如何捕获问题SQL解决过度CPU消耗问题
- Oracle进程内存结构-如何察看Oracle进程消耗的内存
- [日常电脑应用]如何彻底清除电脑使用后的痕迹
- 如何诊断和解决CPU高度消耗(100%)的数据库问题
- 一次异常内存消耗问题的诊断及解决
- 如何彻底清除本地和远程系统日志文件
- 如何清除Hacktool.Rootkit病毒,如何让msdirectx.sys此文件彻底删除,谢谢!
- (转)如何诊断和解决CPU高度消耗(100%)的数据库问题
- Oracle进程内存结构-如何察看Oracle进程消耗的内存
- Oracle诊断案例---如何诊断和解决CPU高度消耗(100%)的数据库问题
- 如何解决weblogic的内存溢出问题