>"dgk" wrote:
>
>Should I dispose of table adapters and data tables and rows or do they
garbage collect themselves?
>On Tue, 16 Oct 2007 11:48:01 -0700, Peter Bromberg [C# MVP] <pb*******@yahoo.yohohhoandabottleofrum.comwrote :
Do they implement IDisposable? e.g, do they have a Dispose method?
If so, you may call it. Otherwise, not to worry, the garbage man will get
around to it.
-- Peter
Is that how you tell whether to dispose of something, it has a dispose
method? I know for graphic objects you have to dispose them, and most
objects you don't have to.
Data connections normally have to be disposed of, and the table
adapter is pretty much a data adapter with a built-in connection
object (with some queries along for the ride).
I guess it's safer to just call Dispose on them.