H
Hans Kesting
Hi,
What are the performance benefits of calling Dispose on a DataSet?
We have a (web) application that we tried to run on a shared server.
It crashed due to memory constraints.
The helpdesk of the hoster said "you need to call Dispose on every
object". Now I know that not every object implements this method,
but DataSet does (and we use it a lot).
I understand that you need to call Dispose when you use unmanaged
resources (like handles to the filesystem or database), and we do.
However when I read the documentation for DataSet it seems to me
that Dispose only has effect for remote datasets. DataSet does not
implement Dispose itself, but inherits it from MashalByValueComponent.
It shouldn't hurt to call Dispose at the appropriate moment, but will
it help in keeping the memory-use down?
Hans Kesting
What are the performance benefits of calling Dispose on a DataSet?
We have a (web) application that we tried to run on a shared server.
It crashed due to memory constraints.
The helpdesk of the hoster said "you need to call Dispose on every
object". Now I know that not every object implements this method,
but DataSet does (and we use it a lot).
I understand that you need to call Dispose when you use unmanaged
resources (like handles to the filesystem or database), and we do.
However when I read the documentation for DataSet it seems to me
that Dispose only has effect for remote datasets. DataSet does not
implement Dispose itself, but inherits it from MashalByValueComponent.
It shouldn't hurt to call Dispose at the appropriate moment, but will
it help in keeping the memory-use down?
Hans Kesting