UIPopoverController *historyPop = [[UIPopoverController alloc] initWithContentViewController:nav]; [nav release]; [historyPop setPopoverContentSize:CGSizeMake(400, 500)]; [historyPop presentPopoverFromRect:CGRectMake(button.frame.origin.x, button.frame.origin.y, button.frame.size.width, 5) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
This is my current code, however, Analyzer says it is probably the leak that is (as the release line is commented out). But if I uncomment the release line, the application will shut down and report that dealloc was available on popover while it is still visible, so when exactly should I let go of the popover controller?
memory-management objective-c iphone ipad
Jonathan.
source share