I have code that copies the structure and contents of a DataTable into another DataTable object. The problem I'm having is, everytime the code is run, memory for the application according to Task Manager creeps up by a meg. The code I'm using is:
dt_temp = GetCopiedDataTable(m_tblStatic);
private DataTable GetCopiedDataTable(DataTable source)
DataTable dt = source.Clone();
for (int i = 0; i<source.Rows.Count;i++)
I was under the impression that if dt_temp is reassigned, the garbage collection would release resources that used for the previous reference. However, it doesn't release any memory at all. Any ideas?