İf I set <gcServer enabled=”true”/> on web config , Can I get performance increase on wisej ?
We are trying to reduce the memory used Thanks advice
You can’t call this.dispose(true). It’s either Dispose() or just close the form (it’s disposed automatically). If you are using dialogs, you have to use the using pattern or dispose when closed. Modal Dialogs are reusable (standard behavior) and are not automatically disposed when closed.
If memory is constantly increasing it means there is a memory leak. A common occurrence in .NET in case you keep references to objects and don’t clear them. Another way to leak memory in .NET is to attach a an event handler, then remove the control from the parent without detaching – which causes the control not to get disposed when the parent is disposed and the event handler will keep it in memory.
You can use the memory profile in VS to find out which object is holding on the other references.
Test it first with a small sample app, create a form with a large string in it to see the memory go up. Then close and check the memory again after the GC kicks in. Or use GC.Collect().
You can use any common .NET tool or approach to find the leak.
Perfomance meaning speed? No. Memory reduction can be achieved by disposing the forms or pages not used.