If I create a new SqlBulkCopy object, VS 2008 and 2010 intellisense does not show it as having a
.Dispose() method and if I just type it in the compiler won't allow it.
Doesn't SqlBulkCopy create unmanaged resources that should be cleaned up by calling
.Dispose()? BOL/VS Help indicate this object implements
.Dispose(). Most code examples show this object being declared in a
using block, but I don't believe using can do the right thing unless it believes the class has a .Dispose() method.
I tried this as a work around:
SqlBulkCopy bc = null;
SqlBulkCopy bc = new SqlBulkCopy();
// do stuff with bc
if (bc != null)
This at least compiles (and runs). However, as I watch my application, which copies a lot of SQL tables, the process's memory usage just keeps growing in task manager.
How do I insu
View Complete Post