emberjs/ember.js — pull request #2133 by pivotal-medici (2013-02-20 23:05:41+00:00)
Title: Close #2043 - Remove last item in CollectionView containing metamorph view

This patch destroys child views using depth first traversal. It ensures that all descendants are marked as removedFromDOM when it is known that the parent view has already been removed.

This changes the behavior of view removal because it now
- Uses depth first instead of breadth first
- It does not rely on `clearRenderedChildren` to destroy child views. `clearRenderedChildren` is only responsible for cleaning up child views that were rendered since the last call to `render`.