0
Answer

Working of base.dispose

kandy

kandy

16y
4.4k
1

Hey Everyone,

      I have created a mdi application with in that so many child windows are attached. I have programmed in such a way that each and every child window will ask user to save or unsave the content or cancel the operation while user tries to close it by clicking close button.  I have grouped all those childwindows and the currently opened childwindows references are maintained in the mdi. The program closes the childwindows one by one when user clicks the close button of mdi. If any of the child windows closing operation is cancelled then total closing operation is cancelled.

   Coming to the problem, it is very simple to narrate. The base.dispose() function fails to clear the managed resources in some system always, which means the exe created works fine in one system where as it is not. I am not able to find the cause for the problem in the error. So I thought of explaining the working of my project a bit. When I walk through the code it is just working fine when close button is clicked like

1)capturing the form_closing event

2)going to dispose method.

In that it just appears standstill after entering into base.dispose() method.

 

Please tell me in what all cases the base.dispose method fails to do its job

Thanks and Regards

Kandy