S
Steven Blair
Would this DataSet be cleaned up?
void Main()
{
DataSet ds = null;
//Imagine this returns some tables
ReturnData(out ds);
//Grab a handle to the first row in the Configuration Table.
DataRow dr = ds.Tables["Configuration"].Rows[0];
//Create a new class and give the refence to the DataRow
TestClass t = new TestClass(dr);
}
Since a refence to part of the original DataSet exists, would this
prevent the DataSet being colelcted by the Garbage collector?
I know I could extract the fields from the Row, into another container,
but the DataRow really is the object I need to use.
Thanks for the help in advance.
Steven
void Main()
{
DataSet ds = null;
//Imagine this returns some tables
ReturnData(out ds);
//Grab a handle to the first row in the Configuration Table.
DataRow dr = ds.Tables["Configuration"].Rows[0];
//Create a new class and give the refence to the DataRow
TestClass t = new TestClass(dr);
}
Since a refence to part of the original DataSet exists, would this
prevent the DataSet being colelcted by the Garbage collector?
I know I could extract the fields from the Row, into another container,
but the DataRow really is the object I need to use.
Thanks for the help in advance.
Steven