Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Comments on Marionette revisions #387

dcmaf opened this Issue · 2 comments

2 participants

  1. I think the memory leak discussion can be simplified since the potential for a leak has already been discussed in the Events section of the Backbone Basics chapter and listenTo/stopListening are introduced there as a solution to the problem. There really isn't even a need to introduce a close() function since Backbone.remove() will call stopListening.

    The real benefit that Marionette provides here seems to be the Region concept and how a region implicitly closes/removes an old view when a new one is attached to the region. I think reducing the section down to just showing how a zombie listener can occur while using listenTo (if you let a view go out of scope without calling remove()) is sufficient to explain the problem and set up how regions provide an elegant solution. I would also just use listenTo throughout the example rather than starting with on() and then changing to listenTo.

  2. At the end of the Region Management section it states that nothing will be called if the view doesn't have a close or remove method. Wouldn't any valid Backbone.View have a remove method since it should be inherited from View (unless they went out of their way to override it and not call the base method or removed it entirely)? If so, then this last sentence can probably be deleted.


I'm happy to try addressing this tomorrow. Including @derickbailey here in case he has any further comments on the Marionette section and suggestions above.


PS: Thanks a lot for reviewing!

@raDiesle raDiesle referenced this issue from a commit in raDiesle/backbone-fundamentals
@addyosmani For #387 - addresses point 2, references earlier chapter for listenTo…
@addyosmani addyosmani closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.