|
-
Jul 20th, 2010, 04:07 PM
#18
New Member
Re: Some explanation about constructor in c#
 Originally Posted by firoz.raj
in the following example.how should i clean the form object??? .let me know please.
Code:
private void button1_Click(object sender, EventArgs e)
{
Form frm = new Form();
frm.ShowDialog();
}
The frm object will be cleaned up as soon as there are no references remaining to it.
In this instance, as soon as the button1_Click function completes. This is because ShowDialog opens the form as a modal form, and the method waits for it to return before exiting.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|