When I place a grid on a form and look at it with a memory profiler, weird things seem to be going on. On each MouseMove over the grid, the undisposed instance count for types like GridStyleInfoStore goes up ... and never comes down.
Is this avoidable?
ADAdministrator Syncfusion Team August 17, 2004 06:36 AM
The styles will get disposed eventually. The default GridVolatileData implementation has a collection of WeakReferences to the GridStyleInfo objects it creates. Once garbage collection collects these instances they will get disposed. (There will be a huge difference between release and debug version when they are collected).
You have the option to provide your own GridVolatileData implementation. For example, the GridPerf example implements a different solution when you don''t need QueryCellStyleInfo callbacks.
Attached find also a modified VirtualGrid sample that I creatd recently and uses a modified GridNonVirtualVolatileData class. Just in case you are interested in investing this option further ...
In that sample QueryCellInfo is only called once for a cell. Then it gets stored in the same style cache that we used in GridNonVirtualVolatileData class and after a cell was initialized the QueryCellInfo event will not be raised again for that cell.
DPDirk PuisAugust 18, 2004 03:05 AM
ok, seems like I was looking at the wrong column in my profiler. The manual mentioned a caveat.
Thanks for the help.
DBDavid BosakJanuary 24, 2005 11:16 PM
I cannot get this attachment. Please give me another link.
ADAdministrator Syncfusion Team January 24, 2005 11:54 PM
You can try this link.
Or, if you have 22.214.171.124 installed, you can get it at: \Syncfusion\Essential Suite\126.96.36.199\Windows\Grid.Windows\Samples\Performance\OneTimeOnlyQueryCellInfo