T
Tilfried Weissenberger
Hi,
I have a strange problem. I have a (self-made) Calendar object on a
form which has a timer object to update itself continually from the
database. Upon closing of the Form, I see in the debug-output that the
calendar continues to poll data from the calendar.
Similarly I have a Form with just a DataGrid, the first time it is
opened, it takes longer (the Design of the DataGrid takes that long).
If I close that window and re-open it, it's really fast - which leads
me to believe that the resources are aswell not released!
My questions are
1) how do I _really_ close a Form/Window?
2) Why isn't the Form.Close() function enough?
3) Why won't Form.Dispose() release all resources used?
4) Assuming Sql-Server and connection-pooling, should I call Close()
or Dispose() on a no longer needed SqlConnection, or do I have to at
all, if the variable looses scope right afterwards anyways?
thanks for any enlightment on these matters!
regards, Tilli
I have a strange problem. I have a (self-made) Calendar object on a
form which has a timer object to update itself continually from the
database. Upon closing of the Form, I see in the debug-output that the
calendar continues to poll data from the calendar.
Similarly I have a Form with just a DataGrid, the first time it is
opened, it takes longer (the Design of the DataGrid takes that long).
If I close that window and re-open it, it's really fast - which leads
me to believe that the resources are aswell not released!
My questions are
1) how do I _really_ close a Form/Window?
2) Why isn't the Form.Close() function enough?
3) Why won't Form.Dispose() release all resources used?
4) Assuming Sql-Server and connection-pooling, should I call Close()
or Dispose() on a no longer needed SqlConnection, or do I have to at
all, if the variable looses scope right afterwards anyways?
thanks for any enlightment on these matters!
regards, Tilli