Hi,
I have a VS2005 windows program written in c#.
In this program I have an array list which stores many DataTable's. When I
first run the pogram the arraylist is loaded with datatables. At this point
when the see the memory used by the program in task manager it is 135,654K.
Now when I minimize the application the memory goes down to 1,456K. Again
when I maximize the program and start using different menu options the
memory used remains around 18,000K - 20,000K.
My question is the huge memory utilized by the program initially is because
of GC has not run or I am using lot of memory in my application?
Will the memory used by the application reduce if I change my program from
using an ArrayList of datatable to a single datatable but having data from
all the rows of each datatable in array list?
Will the memory used by the application further reduce if i used an
arraylist and store values as objects of custom classes instead of using
DataTable?
I am using an ArrayList of DataTables because the information from each
datatable is displayed in a DataGridView. At any given time only one
DataTable from the list is displayed based on the user selection. Right now
in the my ArrayList I have 37,000 DataTables and this is not constant and
will increase or decrease.
What would be the best design approach ? Anyone any ideas?
Thanks,
-Asfar