J
Justin Lazanowski
Cross posting this question on the recommendation of an [MVP]
I have a .NET application that I am developing in C# I am loading
information in from a dataset, and then pushing the dataset to a grid, or
other controls depending on the particular form. This application is setup
with one MDI parent calling MDI children with the exception of one Modal
form (the report viewer).
When I run the application and run one of the screens that pulls the dataset
information, I see in TaskManager (I know, I know just hear me out) the
memory grow from 25MB to 60-70 MB. If I close this screen (I am calling all
of the dispose and close methods I can find for all of my objects) the
memory remains at the same threshold, and in some cases climbs higher after
I call a dispose method.
I understand that the GC may be running in the background (or will at some)
to free this memory but what I observer and keep hearing in these newsgroups
is that the GC will clean these objects but leave the memory allocated to
the application.
The twist here is that this application will be deployed to a terminal
server and may have as many as 35 users running this application. 35 * 70MB
= 2.45GB this doesn't leave much memory room for other applications, so I am
a bit concerned how GC will handle this situation.
When I run an application profiler on the application I see that even after
disposal (maybe I am just not waiting long enough) there are assemblies
still loaded for forms that I have closed (3rd part .NET controls) They seem
to be taking up quite a bit of room.
So my summary questions are here after this novel of a description.
1.) How will the GC handle this situation in the terminal server
environment, if it doesn't return the memory to the OS before the
application is closed it could be a problem for me.
2.) Is there anyway that I can unload these assemblies that I see even after
I have disposed the form?
3.) Any way to make the GC return the memory to the OS
4.) Anyone else have an experience with Custom .net applications in terminal
server, and if so what have you learned.
Sorry for the lengthy question, and an advanced thanks to all who can help!
Justin
I have a .NET application that I am developing in C# I am loading
information in from a dataset, and then pushing the dataset to a grid, or
other controls depending on the particular form. This application is setup
with one MDI parent calling MDI children with the exception of one Modal
form (the report viewer).
When I run the application and run one of the screens that pulls the dataset
information, I see in TaskManager (I know, I know just hear me out) the
memory grow from 25MB to 60-70 MB. If I close this screen (I am calling all
of the dispose and close methods I can find for all of my objects) the
memory remains at the same threshold, and in some cases climbs higher after
I call a dispose method.
I understand that the GC may be running in the background (or will at some)
to free this memory but what I observer and keep hearing in these newsgroups
is that the GC will clean these objects but leave the memory allocated to
the application.
The twist here is that this application will be deployed to a terminal
server and may have as many as 35 users running this application. 35 * 70MB
= 2.45GB this doesn't leave much memory room for other applications, so I am
a bit concerned how GC will handle this situation.
When I run an application profiler on the application I see that even after
disposal (maybe I am just not waiting long enough) there are assemblies
still loaded for forms that I have closed (3rd part .NET controls) They seem
to be taking up quite a bit of room.
So my summary questions are here after this novel of a description.
1.) How will the GC handle this situation in the terminal server
environment, if it doesn't return the memory to the OS before the
application is closed it could be a problem for me.
2.) Is there anyway that I can unload these assemblies that I see even after
I have disposed the form?
3.) Any way to make the GC return the memory to the OS
4.) Anyone else have an experience with Custom .net applications in terminal
server, and if so what have you learned.
Sorry for the lengthy question, and an advanced thanks to all who can help!
Justin