Add _close() method that does the actual cleanup (close() asks the
user what they want first if there's unsaved stuff, and may cancel).
It closes more than before.

Add unload_extensions() method to unload all extensions; called from
_close().  It calls an extension's close() method if it has one.
1 file changed