Unlike the controller of a modal view or of a view used in a tab bar interface or a navigation interface, a UIPopoverController instance is not automatically retained for you; you must retain it manually. You’ll need a reference to any UIPopoverController that you present, because without such a reference you can’t do two things you’re likely to want to do afterward:
dismissPopoverAnimated:message. But you can’t do that unless you have a reference to that UIPopoverController.
alloc, you’re eventually going to want to send it a
releasemessage. But you can’t release a UIPopoverController while its popover is showing. Thus, you’re going to want to release the UIPopoverController after its popover has been dismissed. But you can’t do that unless you have a reference to that UIPopoverController.
Nor do the complications of popover management end there. In keeping with the transient nature of popovers, I like to dismiss the current popover programmatically when the application undergoes certain strong transitions, such as going into the background or being rotated. ...