When a form is closed, does it dispose? If not, how can I force that?
Trying to do a little memory management :-)
Derek 4 1438
On Fri, 12 Nov 2004 16:21:25 -0600, Derek Martin wrote: 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.
On Fri, 12 Nov 2004 16:21:25 -0600, Derek Martin wrote: 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" <"dunawayc[[at]_lunchmeat_sbcglobal[dot]]net"> wrote in
message news:1t******************************@40tude.net.. . On Fri, 12 Nov 2004 16:21:25 -0600, Derek Martin wrote:
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" <"dunawayc[[at]_lunchmeat_sbcglobal[dot]]net"> wrote in
message news:1t******************************@40tude.net.. . On Fri, 12 Nov 2004 16:21:25 -0600, Derek Martin wrote:
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tonya |
last post by:
Hi,
Does anyone have any example of how i can manage forms in
my application??
I want to be able to reference my form instances that are
currently open from other forms.
why cant i open...
|
by: Ranier Dunno |
last post by:
Hi,
I'm writing a data layer, and would like all components
to have a single place for retrieving a connection to the
(SQL Server) database. Currently, I'm treating the
connection as somewhat...
|
by: Ale K. |
last post by:
What's the best way to make a form return a value.... i want to try to avoid
using module variables for doing this...
Thanks.
Alex.
|
by: spebola |
last post by:
I am using VB.Net 2003 professional edition, and .Net Framework 1.1,
and Windows forms.
What is the proper way to close a windows form displayed by the Show
method? I would like it to be removed...
|
by: Eric Sabine |
last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET
connection object, SQLConnection to be exact) and then I came across the
following in some microsoft code.
If Not cn Is Nothing...
|
by: Derek Martin |
last post by:
When a form is closed, does it dispose? If not, how can I force that?
Trying to do a little memory management :-)
Derek
|
by: Jan Nielsen |
last post by:
Hi
I have a main form showing personal information (name, address etc.) bound
to a dataset.
One of the pieces of information is the Group the person belongs to. This is
selected from a combo box....
|
by: Michael.Suarez |
last post by:
Suppose I have a button on a form that opens up another form. the code
in the buttons click event is:
frmMyCustomForm frm = new frmMyCustomForm ();
frm.ShowDialog();
frm.Dispose();
The...
|
by: =?Utf-8?B?UmljaCBIdXRjaGlucw==?= |
last post by:
I have a form, Form1, that shows an instance of Form2 when a user clicks a
button. On Form2, the user is to select items, Customer Names for example,
from a datagrid control. When the user clicks a...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |