I am new to Marionette, so maybe there is a reason this function does not already exist, or maybe it does and I am just overlooking it. Maybe it is not even necessary or does not jive with the Marionette design philosophy?
Why is there not a corresponding Marionette.Application.prototype.stop for Marionette.Application.prototype.start? It seems simple to implement:
1. iterate over the application instance properties
2. check for instances of views and regions; if so close
3. check for 'regions' property; iterate over regions; if instance of region then close
4. check for onStop function; if it exists execute function; special application cleanup like onClose for views and regions
5. kill event aggregation and listeners??? (I just delete the application instance in my case)
I created my own stop function because we have a parent application that is composed of many child applications. There are n types of child applications with n instances of child types running. A user can add or remove child applications at their discretion. Having a stop/destroy function is useful for my scenario, so I was wondering if others had the need for such functionality as well.