Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sleaver

macrumors member
Original poster
Jul 21, 2010
53
18
Hi

To start with I have a view hierarchy as follows in a navigation controller:

ContainerView
---- SubContainerView
-------- UIWebView (for this case)

If I start loading a URL in the UIWebView but then navigate back in the navigation controller I get a EXEC_BAD_ACCESS on the following line in main.m:

PHP:
int retVal = UIApplicationMain(argc, argv, nil, nil);

I read that its because of the order of delegate being released so I added the following code in my view controller as I have a property for the webview and load it into the subContainerView:

PHP:
- (void)viewDidDisappear:(BOOL)animated {
	[externalView stopLoading];
        externalView.delegate = nil;
        [externalView release];
}

However it still crashed so I added zombies and get the following:

[DriversDetailViewController_iPad respondsToSelector:]: message sent to deallocated instance 0x663b520

Any ideas because I've run out of then?

Edit - I'm using Xcode 4 and having trouble finding anything so if I need anything please point me in the right direction!
 
I read that its because of the order of delegate being released so I added the following code in my view controller as I have a property for the webview and load it into the subContainerView:

...

Any ideas because I've run out of then?

How is the property set up? Does something retain that delegate? If not, should something be retaining it?

The message you're getting tells you that the object you're trying to send the message to (delegate) has been reclaimed by the garbage collector because it's reference count has fallen to 0.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.