@chris
To tidy up, of course! You can't free all the resources until the AmigaGuide process has closed.
I'm using asynchronous AmigaGuide help in my software (I did send you my amigaguide.class code, didn't I?), and I never really needed the system to tell me when the database was closed. This is how it works basically:
- OM_NEW calls OpenAmigaGuideAsync() and allocates the database resources (the document window doesn't get opened in async mode).
- When the user requests help, the opening method (AGM_OPEN) is called. The method calls SendAmigaGuideCmd() to actually display the document. Should the document window be already opened, the command brings it to front (i.e. just one asynchronously-opened instance of the help file is allowed).
- The help file stays open as long as the user wishes.
- When you quit your program, you call OM_DISPOSE upon your help file object, which first calls AGM_CLOSE to close the document window (if it is still opened) and deallocates all resources.
So it's one help file, one allocation, one deallocation. What other tidying-up do you need?