I have a UIWebView in a viewcontroller, which has two methods as below. The question is if I pop out(tap back on navigation bar) this controller before the second thread is
- (void)dealloc
{
if(![NSThread isMainThread]) {
[self performSelectorOnMainThread:@selector(dealloc)
withObject:nil
waitUntilDone:[NSThread isMainThread]];
return;
}
[super dealloc];
}
I tried :
[self retain];
[self performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
which seems to work even better.