Win Form memory problem.

  • Thread starter Thread starter Marty Mathis
  • Start date Start date
M

Marty Mathis

I currently have an MDI application that has large
Datasets displayed in Datagrids on my MDI child forms.
The problem is when I kill one of the child forms my
memory is never reclaimed. If I reopen another child
form, the memory will just keep climbing until it brings
my system to a hault even when I kill all child forms.
However, when I minimize and then restore my application,
my memory usage drops to almost nothing (basically where
it should be at start up with no MDI children). Is there
anything I can do to solve this problem? I certainly
don't want to have to minimize the application to reclaim
memory. Any help would be appreciated.

Thanks,
Marty Mathis
(e-mail address removed)
 
When a window is being minimized, Windows OS supposes the user does not need
the application any more, so Windows OS will truncate its workset.

By default, the application memory size you observed in Task Manager is the
workset size. You may want to see the VM Size in Task Manager.

Also, you can call GC functions explicitly.
 
Out of curiousity. Calling GC - is this guaranteed to run and free up
memory - or is it similar to java where it isnt really guaranteed to be run
right when you call it?

Regards.

Daniel Rodriguez
Animusoft Corporation
www.animusoft.com
 
Back
Top