Cleaning up an app's runtime

The progress made in 1.3 means that we’re headed towards being able to load things on demand, instead of everything all at once (eventually loading things through the network instead of all code sent in a single initial bundle). This will be good.

When an app loads, currently, every single code module is sent to the client, and every single HTML template definition sits in memory, even if never used. As the app grows, this initial memory foot print becomes larger and larger despite much of possibly not being used. Being able to load things lazily through the network will solve this initial problem, but once thing have been loaded, it might be nice to also have a way to clean these things up.

With some new API, app logic could, for example, destroy template definitions and other stuff. If the stuff that was deleted is needed again, it could be loaded again (through the network, for example).

For many apps, this may not currently be a problem, but for really big apps, it could be.