Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.


Back to Forum: Tech Off
  • User profile image

    In .NET DataColumn objects are IDisposable, but if you have a DataColumn[], then you can't dispose of it. How come, just wondering?

  • User profile image

    Because arrays are not disposable.  Arrays of T do not descend from T.

    Walk the array and dispose of each item individually.

  • User profile image

    DataCollumn[] is an array type that stores references to DataCollumn objects in heap because DataCollumn is a reference type.

    The Array Type is a reference type that doesn't implement IDisposable

    DataCollumn[] is an type derived from Array, compiler generated

    and ofcourse it does'i implement the same interfaces of it elements.

  • User profile image

    Gotcha...thanks a bunch Cool

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.