title: Controller Strategy / Garbage Collection (destroy)
body: <p>Trying to figure out the "ember best practices" for my app, regarding MVC. also for reference, I'm using ember-data, ember-layout, and ember-route-manager.  </p>
  
  <p>I'll use User as an example:</p>
  
  <p>what I feel like I want to do is to get a User model from the database... then wrap it in a UserController, and set the model on a "content" property... then in a View, I want to bind to the <strong>controller</strong> for some functionality, and to the <strong>controller.content</strong> for model-level data. so a controller might look something like:</p>
  
  <pre><code>App.UserViewController = Em.Object.create({   
      content: userRecord,
      isFollowingBinding : 'content.you_follow', 
      toggleFollow: function() { 
         make server call to change following flag 
      }
  });
  </code></pre>
  
  <p>then the view could bind to the <strong>{{controller.content.name}}</strong>, or <strong>{{#if controller.isFollowing}}</strong>, or <strong>{{action "toggleFollowing" target="controller"}}</strong></p>
  
  <p>but say I get a list of User models back from the database... I feel like what <em>should</em> happen is that each of those models should be wrapped with a controller, and <em>that</em> should be returned as a list... so the view would have a list of UserControllers</p>
  
  <p>Incidentally, I've done this... and it is working nicely.... except that everytime I reload the list, I wrap all of the new model objects with new controllers... and over time, the # of controllers in memory get larger and larger. on my base Controller class, I'm logging calls to "destroy", and I dont see it ever happening</p>
  
  <p>when it comes to Em.View... I know that everytime it is removed from the screen, .destroy() gets calls (I am logging those as well). so if I were to move my code into a view, i know it will get destroyed and recreated everytime... but I dont feel like the functionality like toggleFollow() is supposed to be in view...</p>
  
  <p>SO QUESTIONS:</p>
  
  <ul>
  <li>is this how MVC is supposed to work?  every instance of a model wrapped in a controller for that model?  where there could be lots of controller instances created for one screen?</li>
  <li>if I go down this approach, then I'm responsible for destroy()ing all of the controllers I create?</li>
  <li>or is the functionality I've described above really meant for a View, and them Ember would create/destroy them as they are added/removed from the screen?  also allowing template designers to decide what functionality they need (if they just need the <strong>{{user.name}}</strong>, theres no need to instantiate other controller/view classes... but if they need a "toggle" button, then they could wrap that part of the template in <strong>{{#view App.UserViewController contentBinding="this"}}</strong> )</li>
  </ul>
  
  <p>I re-wrote this a few times... hopefully it makes sense....</p>