Hi There,
We have been using the Code Jock controls for some time but just recently our application https://forum.codejock.com/uploads/20070901_092442_ReportControlMe.zip - uploads/20070901_092442_ReportControlMe.zip seems to be using a lot lot more ram. I did some investigation and it appears that when we use the Report Grid control and add a lot of items where we set the caption to be different from the value (we do this for all numeric & date fields because we format them nicely for the user) the grid exhibits a severe memory leak.
I have put together an example project demonstrating this. If you fill the grid with 20,000 rows each the control consumes a fair amount of ram as expected - when you then clear it all of that ram is freed (correction - most). If however you fill it with the same number of rows and explicitely set the caption on each of the values the grid consumes a lot of ram again but when you clear it is not all freed - in fact a large percent is never freed. When I am running this in a VB6 IDE the ram isn't even freed when I close the application and I have to terminate the IDE to free it.
The memory figures (KB) with 20,000 records / 40 Columns are as follows:
Project started in IDE and form displayed: 14,920 Grid filled with rows but Caption not set: 198,824 Grid then cleared: 17,272 (A slight gain that needs to be checked we have lost 3 meg somewhere) Grid then filled with rows and Caption set explicitely: 261,868 Grid then cleared: 129,352 (We have lost over 100 meg of ram somewhere!)
App closed return to VB design environmentGrid then cleared: 129,380
(We have still not reclaimed the missing 100 meg!)
This is obviously very urgent for us as we are using this with a very high number of users in a Terminal Services environment so any memory leaks result in degredation of the server performance and eventual crashes in our application.
Can you give me an estimate for a fix please?
Dhugal.
|