Moved kernel dispose to application.onexit

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-08-04 21:13:32 -04:00
parent aba42c3c61
commit b50a15aaf4
3 changed files with 8 additions and 10 deletions
@@ -38,15 +38,11 @@ namespace MediaBrowser.ServerApplication
try
{
DateTime now = DateTime.Now;
splash.Show();
kernel = new Kernel();
kernel.Init(progress);
var time = DateTime.Now - now;
}
catch
{
@@ -64,11 +60,6 @@ namespace MediaBrowser.ServerApplication
// Don't show the system tray icon until the app has loaded.
this.MbTaskbarIcon.Visibility = System.Windows.Visibility.Visible;
}
private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
kernel.Dispose();
}
#endregion