       @appControllers[name].instances.splice index, 1
       if @appControllers[name].instances.length is 0
         delete @appControllers[name]
-      appInstance.destroy()
 
   createPromptModal:(appOptions, callback)->
     # show modal and wait for response


  quit:(appInstance, callback = noop)->

    @unregister appInstance
    callback()

  quitAll:->

    appView?.once "KDObjectWillBeDestroyed", =>
      @unregister appInstance
      appInstance.emit "AppDidQuit"
      KD.getSingleton('appManager').emit  "AppDidQuit", appInstance

  setLastActiveIndex:(appInstance)->

