Dispose a DataTable

  • Thread starter Thread starter Chakra
  • Start date Start date
C

Chakra

In ADO.NET (for Windows.NEt and ASP.NET), there is a DataTable.Dispose()
method. What is the best way of disposing a datatable in CF.NET ?
 
To tell the truth, DataTable.Dispose() for Framework 1.1 (as well as for
Compact Framework 1.0) is inherited from MarshalByValueComponent class
and do nothing for disposing DataTable data. To remove all data from
DataTable use DataTable.Clear() method instead.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
DataTable allocates no native resources, so you don't have to dispose of
it.
Just let GC collect it if you don't need it anymore.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
Back
Top