M
Miha Markic
Jon,
DataTable is keeping track of rows with an internal collection.
Even of those just created by NewRow and not yet Added.
Maybe the designers didn't foresee that one would use NewRow only for buffer
or cache.
The second thing is that if you delete (not remove) rows that are marked as
RowState=RowState.Added (thus before calling AcceptChanges) the row will be
ready for GC. Otherwise table keeps the row because it needs it for database
synchronizing.
Hope this explains something,
DataTable is keeping track of rows with an internal collection.
Even of those just created by NewRow and not yet Added.
Maybe the designers didn't foresee that one would use NewRow only for buffer
or cache.
The second thing is that if you delete (not remove) rows that are marked as
RowState=RowState.Added (thus before calling AcceptChanges) the row will be
ready for GC. Otherwise table keeps the row because it needs it for database
synchronizing.
Hope this explains something,