When the application receives some kind of user input through its IDCMP, it diverts the message down to its children, as long as they are opened.
Things like iconification or preferences changes cause the application object to temporarily close every open window (and reopen it later). Your main program normally doesn't need to deal with these things.
As with the children of group class, it's common to use a call to MUI_NewObject() as value for this attribute. No error checking needs to be done, the application object handles every failure automatically.
When you dispose your application, its sub windows will also get deleted. Thus, the only thing to do to remove your application is a
MUI_DisposeObject(ApplicationObject);
Every window, every gadget, every memory will be freed by this single call.