【问题标题】:release contents of UIWebViewUIWebView 发布内容
【发布时间】:2010-08-27 08:52:33
【问题描述】:

我在 Interface Builder 中创建了一个 ViewController 和 UIWebView。我用这样的数据填充 webView:

 NSString *urlAddress = self.artUrl;

 //Create a URL object.
 NSURL *url = [NSURL URLWithString:urlAddress];

 //URL Requst Object
 NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

 //Load the request in the UIWebView.
 [self.webView loadRequest:requestObj];

我应该如何在 didReceiveMemoryWarning 中释放这个 webView 的内容?

谢谢

【问题讨论】:

    标签: iphone memory-management uiwebview


    【解决方案1】:

    您要么释放整个网络视图(例如,如果它不在屏幕上),要么什么都不释放。如果你真的需要发布内容,加载一个空白页面。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-13
    • 2013-06-30
    相关资源
    最近更新 更多