Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1520
WinGrid Memory Management
posted

Hi

I'm trying to understand some memory problems with my app and I need a basic understanding of how wingrid manages memory.

I have a button which executes a SQL query and returns a DataSet. The DataSet obviously owns an amount of memory

I then bind the DS to the grid using:

ultraGrid1.SetDataBinding( null, null );
ultraGrid1.SetDataBinding( oDS, null );

Q1: Does wingrid copy all of the data from the DataSet into the grid? Is my original DS unchanged?

Q2: If I press the button a 2nd time to repeat I will get a 2nd DataSet. Is my original DS still in memory? Does it go out of memory when ultraGrid1.SetDataBinding( null, null ); is called?

If I look at the app using Task Manager the memory just keeps going up until I get an out of memory exception

Thanks