The deletePage() and deleteWidget() API functions should be used to remove pages and widgets from memory when you no longer need them. Note that deletePage and deleteWidget may only be used on pages/widgets that you dynamically create (the same applies to the RemoveWidget method of page objects). Also, using deletePage() on a page that contains widgets you have created does not absolve you of the responsibility of deleting the created widgets - these remain in the holding area, and you must run deleteWidget() on each of them to clean them up - so you should keep track of them. You should not use deleteWidget() to delete a widget that is still on a page - use the page's RemoveWidget() method to remove the widget first, then delete it.
Note that unlike custom objects, widgets are not owned by plugins - they will remain if your plugin is unloaded before eboxy quits. If you do not want them to be persistent, you should explicitly remove them. However, at this present time, if you change to a different XML file, the created pages will be cleared out - this is considered to be a bug and will be fixed in subsequent versions of eboxy.