UIWebView leaking

前端 未结 2 639
忘了有多久
忘了有多久 2020-12-18 16:36

I have a class that extends UIViewController and implements the UIWebViewDelegate, like this:

@interface TableViewController : UIViewController 

        
相关标签:
2条回答
  • 2020-12-18 16:43

    Along with setting the webView delegate to nil, you should ask your webView to stop loading. Add the following lines of code and then try:

    - (void)dealloc {
        self.articleWebView.delegate = nil;
        [articleWebView stopLoading];
        [articleWebView release];
        [super dealloc];
    }
    
    0 讨论(0)
  • 2020-12-18 17:05

    If articeWebview is an IBOutlet why is it that you want to allocate it??

    0 讨论(0)
提交回复
热议问题