I am working on VB.NET multiuser application and whenever any of my forms opens up – memory rises, and after some time OutOfMemoryException is thrown.
I am working on VB.net 2008 and SqlServer 2005.
I have used very many of shared object so second time its memory allocation is less,
but how i can reduce it when form is closed or not in use.
Can i use Garbage collector or Dispose and how I use this functionality ?
Are you detaching all event handlers as needed? This is a common source of memory leaks in .NET applications.
You can troubleshoot this by using tools like ANTS Memory Profiler or if you prefer a free option WinDbg+SOS is very useful (but not as easy to use).