Hi,
I have one MDI form and all other forms are its children. So if mdi form is
closing that means my application is closing. But my problem is about the
child form in which the native controls and some objects are not disposing.
In the profiler, i have seen that whenever i open a child form, the active
objects get more and more. Although i close and dispose the child form, the
native controls and some object remain alive.
When i close a child form, i also set the event handlers of the child form
to null. But as i said before in the memory i see always native controls
much.
Did you try that when you add many controls on a child form, and close it,
what happens on the virtual memory? In my application it remains same.
Thanks.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:uM**************@TK2MSFTNGP02.phx.gbl...
Adam,
Do you set any methods on your MDI forms as event handlers for other
objects outside of the MDI form? If so, that could be extending the
lifetime of your MDI form.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Adam Right" <aa*@aa.comwrote in message
news:91**********************************@microsof t.com...
>Hi,
I am developing an application which has established on MDI Form and
there are many MDI Child forms. My problem is starting when i close the
mdi child forms. They are not disposed from the virtual memory, so it
wastes much memory for the clients. I trigger GC.Collect and i also
implemet IDisposable method for all object that i have created. But when
i use a memory profiler that shows the status of the current object for
my application, i see that there are many native controls and some
objects that are not disposed from the memory.
I use C# and .net framework 2.0, so have you met problem as same as my
problem? If you have suggestion it will very helpful for me. Thanks..