Memory is not Released in Windows Application when ever any Form is Closed
-
Hi All, I m developing one Windows Application in C# in VS2008. The following problem occurred in my application. 1. In my application when u open a Form the memory usage is increased to 100MB. This Form Contains more than 50000 Tree Nodes. These Nodes taking that amount of memory. Then After if i closing that opened Form how much amount of memory is raised when that form is opened that amount of memory is not released when that form is closed. Please give me solution for this how to free the memory when that form is closed. Thanks, Kedar
-
Hi All, I m developing one Windows Application in C# in VS2008. The following problem occurred in my application. 1. In my application when u open a Form the memory usage is increased to 100MB. This Form Contains more than 50000 Tree Nodes. These Nodes taking that amount of memory. Then After if i closing that opened Form how much amount of memory is raised when that form is opened that amount of memory is not released when that form is closed. Please give me solution for this how to free the memory when that form is closed. Thanks, Kedar
k_kedarnadh wrote:
that amount of memory is not released
who says? objects that are no longer reachable become collectible, so when your app needs memory and runs its GC, it will collect them and reuse the memory. Most often it will not return the memory to Windows though, why should it? It would return what is redundant to Windows when your app gets minimized. :)
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
-
Hi All, I m developing one Windows Application in C# in VS2008. The following problem occurred in my application. 1. In my application when u open a Form the memory usage is increased to 100MB. This Form Contains more than 50000 Tree Nodes. These Nodes taking that amount of memory. Then After if i closing that opened Form how much amount of memory is raised when that form is opened that amount of memory is not released when that form is closed. Please give me solution for this how to free the memory when that form is closed. Thanks, Kedar
If you're looking in TaskManager, you're looking in the wrong place to see how much memory your app is actually using.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...