KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I created a test code: private void Application_Startup_1(object sender, StartupEventArgs e) { ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown; MainWindow window = new MainWindow(); window.Show(); window.Close(); window = null; GC.Collect(); } The MainWindow is a automatic created window by Visual Studio and I haven't add any code to it. Before the line "MainWindow window = new MainWindow();", the application occupies 4M memory. When the window is opened, it became 13M. It doesn't change even if we close the window and call the GC.Collect() What are these extra memory being used for and how can we release them?
Tags (comma-separated)
Save Edits
Cancel