Paul,
You would create the forms so that each form would have a timer that
would fire when the time expires. Every time you do an action on the form,
you would reset the timer and change the time elapsed (you would disable the
timer, then restart it).
Basically, when the timer fires, you would call Dispose on the form (the
timer will only fire when no action has taken place). This will take care
of the unmanaged resources the form was holding.
It might actually be a good idea to call GC.Collect. I used to think
that you should not call GC.Collect except in the most rare of cases, but it
appears that your situation is prime for calling a Collect. Check out Rico
Mariani's blog entry on the subject, located at (watch for line wrap):
http://blogs.msdn.com/ricom/archive/...29/271829.aspx
However, I would still generally say that you should not call GC.Collect
generally, unless your performance tests indicate you have a bottleneck
under the conditions specified in the blog entry.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:eX******************@fe1.news.blueyonder.co.u k...
Hi
I have an MDI app....
All child MDI windows are non-updateable... however, the users may leave
the windows open... and there can be several of them.
I want to implement a system to dispose of MDI child windows after a
period of inactivity, in order to release resources and fire a garbage
collect...
Does anyone have any views, or ideas on how to do this??
Thanks