I currently store about a million rows in a DataTable, it takes about 600 MB of RAM.
So, when you run the application, it stores 1,000,000 rows in a DataTable and displays it on a GridView. When you close the application, this will obviously clear the memory.
I would like to provide the user with this option, in other words, when the user tries to close the form, they will ask him if he wants to clear the memory or not.
The reason for this is that you do not have to wait until the data is read into Datatable every time it launches the application.
.... I am new to C #, so I apologize if this is the relevant question.
source share