When I am trying to release the object of UIPopoverController,app gets crashed with message EXC_BAD_ACCESS. See below code snippet:
UITableViewCell *tblcell=(UITableViewCell*)[heatsv viewWithTag:500+sender.tag];
ResourceDetail *objRDPopup=[[ResourceDetail alloc] init];
UIPopoverController *aPopover1 = [[UIPopoverController alloc] initWithContentViewController:objRDPopup];
[aPopover1 setPopoverContentSize:CGSizeMake(300, 195)];
[aPopover1 presentPopoverFromRect:sender.frame inView:tblcell permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[objRDPopup release];
[aPopover1 release]
Thanks in advance
Popovers are not retained when you present them, so it’s not safe to release them when they’re still onscreen.
Assign your popover to a retained property in your viewController class instead, then release it in your viewDidUnload/dealloc as normal.