I don't see why you'd say a DataTable wants to be disposed, especially
since DataTables always suppress finalization (it's in the default
constructor) which means that Dispose will not be called unless you
call it yourself (implying it doesn't need to be called at all).
DataTable also doesn't implement Dispose itself at all--the only
implementation it has is what it receives from
MarshalByValueComponent, which removes it from the container if one
exists and broadcasts the disposed event. Besides this, as far as I
can tell a DataTable never beomes sited unless you specifically set
the Site property.
Sam
On Wed, 02 Mar 2005 19:25:52 GMT, "Uchiha Jax"
<i_************************@NOSPAMhotmail.com> wrote:
DataTables also really like to be disposed.
"Bruce Wood" <br*******@canada.com> wrote in message
news:11*********************@l41g2000cwc.googlegr oups.com... Yes, so long as the resources that myStuff.o is holding internally are
_managed_. myStuff.o itself will certainly be cleaned up when myStuff
goes out of scope.
The only things that wouldn't be cleaned up would be any pointers to
unmanaged resources, usually gained via calls to non-.NET dlls or the
Windows API, that myStuff.o may be holding. If you have those sorts of
resources, you must be sure to release them via a try...finally, a
using, or a Dispose() method.
As well, there seem to be some managed types that benefit from explicit
disposal. The ones I've run across are Forms and Images, but there may
be other. This seems to speed up the GC process.
B-Line is now hiring one Washington D.C. area VB.NET
developer for WinForms + WebServices position.
Seaking mid to senior level developer. For
information or to apply e-mail resume to
sam_blinex_com.