Skip to content

Instantly share code, notes, and snippets.

@anaisbetts
Created June 7, 2011 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anaisbetts/1011601 to your computer and use it in GitHub Desktop.
Save anaisbetts/1011601 to your computer and use it in GitHub Desktop.
namespace Leak
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
this.ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown;
Action a = null;
a = () => {
new MainWindowViewModel();
GC.Collect();
Dispatcher.BeginInvoke(a);
};
a();
//while (true)
{
#if DISPOSABLE
using (new MainWindow());
#else
#endif
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment