Form Close Disposes?

  • Thread starter Thread starter Derek Martin
  • Start date Start date
D

Derek Martin

When a form is closed, does it dispose? If not, how can I force that?
Trying to do a little memory management :-)

Derek
 
When a form is closed, does it dispose? If not, how can I force that?
Trying to do a little memory management :-)

Derek

If you show the form using the Show method, it is automatically disposed
when you close it. If you show it using ShowDialog, it is NOT disposed and
you must dispose of it yourself.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
Awesome - thank you!


Chris Dunaway said:
When a form is closed, does it dispose? If not, how can I force that?
Trying to do a little memory management :-)

Derek

If you show the form using the Show method, it is automatically disposed
when you close it. If you show it using ShowDialog, it is NOT disposed
and
you must dispose of it yourself.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top