Destroy app between routes



I have Ember as part of a larger application, therefore Ember is a subroute. When I navigate away from Ember, how can I destroy the Ember app?

Currently, when navigating to an Ember route I call:

window.MyApp = require('MyApp/app')['default'].create();

When I change the route the dom is refreshed, so the ember app is gone, except the window (js) still has it. Is there a better approach?