Quote:
DtRptDisc = New Datatable
Is this creating a duplicate instance ? or recreating the same instance?
It creates a new
DataTable
instance, and clears the reference to the old one from the field.
If you have used the value of that field anywhere else, there may be a reference to the original instance hanging around. If not, the
GC will eventually clean up the memory used by the old instance.
If you want to ensure that only one instance is ever used, and that all references share the same view of the data, you should reload the
DataTable
rather than creating a new instance.