Re: Problem (dispose?) MDI forms
- From: "VJ" <nonewsaddress@xxxxxxxxx>
- Date: Fri, 16 Mar 2007 08:41:23 -0500
Sure.. Close does not mean the object is immediately available to be garbage
collected and disposed. There is still other objects created by child Form2
in memory, as long as all of it are not cleared Form2 will exist. Now these
are not limited to Child form controls, they can be threads or any other
objects created when Form2 i.e. child was in memory and working...
HTH
VJ
"SealedClassSingleton" <Eagle@xxxxxxxxxxxxxxxx> wrote in message
news:3238DC52-45DD-4B33-93F0-DA6A19AAAEA0@xxxxxxxxxxxxxxxx
Hi,
I've a very weird error in an MDI application. From time to time, when
closing a child form, the form is closed correctly (put some writelines on
different places: form_closing / form_closed / dispose) but is not removed
from the MDIparent.
When I iterate over all child forms I can close the form a second time (?)
even all controls are already disposed.
When clicking on the "closed" form in the MDI list, I get an
ObjectDisposed
Exception.
A first chance exception of type 'System.ObjectDisposedException' occurred
in System.Windows.Forms.dll
System.ObjectDisposedException: Cannot access a disposed object.
Anyone who had similar problems ? Suggestions ?
.
- Prev by Date: change carat in textbox?
- Next by Date: Re: Creating a multi-page project
- Previous by thread: change carat in textbox?
- Next by thread: Re: Problem (dispose?) MDI forms
- Index(es):
Relevant Pages
|