jamesplease / puppets

A modern Backbone extension.
MIT License
4 stars 0 forks source link

Think about recursive removal #10

Open jamesplease opened 9 years ago

jamesplease commented 9 years ago

View#remove should be a reliable method, but right now it is ignorant of any idea of there being a nested view structure. Are there memory leak issues there? I need to think about how I want to handle the shutdown of the entire view tree.

remove plucks the element from the DOM tree and calls stopListening, so presumably I should do a few things at this point:

Note to self: right now, each view has its entire tree in a collapsed form available under _childViews, which could be utilized in situations like this.