Does disconnectOutlet destroys controllers?


#1

I have a regular modal popup in the application route that looks like this:

showPopup:function(popupName){
   this.render(popupName, {    
     into: 'application',    
     outlet: 'popup'    
  });     
} 

on ‘close’ action I use disconnectOutlet, however the controller, associated with the popupName template is not getting destroyed.


#2

It is a correct behaviour. Generally disconnectOutlet is used to remove a template and View associated with the given outlet. Controllers are singleton objects and they aren’t destroyed.