Question on some Functions....

mojoman

Member
Joined
Nov 21, 2006
Messages
20
Programming Experience
Beginner
For the record I have tested Application.Exit, this.close, and this.dispose so I know what they do and am not asking the group to tell me what happens. I am looking for a more conceptual explanation (ie what is happening behind the scenes) to some of the questions I am asking.

Should a coder always try to use Application.Exit, this.close, or this.dispose when possible or does the automated process of .NET handle the situation just as well. For example, when closing a form should one put this.close or this.dispose or just let the default event handler handle the job? Similarly, should one use Application.Exit when a main form is being closed or let the default handlers take care of the job and exit the application? Also, could someone point out the difference between this.close and this.dispopse. This.close seems to be like opening and closing a form and all the data remains there and this.dispose seems to be destroy all data in the form and when it is reselected it is created a new.

SOmeone in a previous post also said that dispose releases unmanaged resources. Could someone explain what is mean by unmanaged? I assume it means not being supervised by the .net framework. SOmething like heap/stack memory might be unmanaged right?

Thanks!
 
Back
Top