Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>EDIT - If you don't want to read all the comments, here's what was going on :</p> <p>The content was coming from you tube - using a different URL removed the crash :(</p> <hr> <p>Hi,</p> <p>1) What's with all the <code>[self retain]</code> and <code>[self release]</code> calls? You shouldn't need any of them - if you do then you're covering up a bug somewhere else in your code.</p> <p>2) This just looks wrong - </p> <pre><code>[webView stopLoading]; if ([webView isLoading]) [webView stopLoading]; </code></pre> <p>if you have to put this there is a bug somewhere else - if calling stopLoading doesn't work then calling it again won't help!</p> <p>3) Your entire loadRequest method can just be <code>[webView loadRequest:request];</code> - you can fairly safely assume that if you tell the webview to load something, it will stop loading anything else.</p> <p>4) I put <code>[super viewDidLoad];</code> at the start not at the end of my viewDidLoad function - you don't know what else it sets up that you might need (though it might also do nothing - I just try to play it safe) 5) What's the property declaration in your .h file for the webView (it should be retain) (Assuming that it's created as a IBOutlet from a xib file)</p> <p>6) In your viewDidUnload you need to remove your webview - set it's delegate to nil and call <code>[self setWebView:nil];</code> otherwise you might leak it. (Assuming that it's created as a IBOutlet from a xib file)</p> <p>I've just realised that this sounds very critical - it's not meant to be, we've all tried these things when debugging memory issues!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload