Hi,
My app displays big (1000 x 1000) color grids of data at user request. For efficiency purposes we're using ColorGrid.Bitmap to pass data to the series. It works very well, the only problem is that if the user keeps switching the plot, the allocated memory (Committed Bytes counter) goes up and eventually (after 6-12 times) I get an OutOfMemoryException. What's scary is that the memory often climbs up by as much as 200 MB at a time!
My suspicion is that this is related to the Bitmap property. I have tried to feed the color grid a sample 10x10 bitmap instead and the memory behavior is much more reasonable - it still goes up every time I switch plots but at a much slower rate.
Also, adding a GC.Collect() call each time the user switches plots doesn't help at all.
Could someone at Steema please take a look at the code surrounding the Bitmap property and give me some hints? I suspect that the Bitmap is not being released or something...
Best,
Michal Blazejczyk
Using ColorGrid.Bitmap results in OutOfMemory exception
-
- Newbie
- Posts: 64
- Joined: Fri Jun 16, 2006 12:00 am
Using ColorGrid.Bitmap results in OutOfMemory exception
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec
Michal Blazejczyk
Lead Programmer
Genome Quebec
-
- Newbie
- Posts: 64
- Joined: Fri Jun 16, 2006 12:00 am
Actually, the same behavior exists when I use FillSampleValues(1000) though it is less extreme, the memory drops occasionally (but the trend is still there, considerably so).
Another fun fact: each time such a large grid is redrawn, memory usage goes up by about 30-50 MB!
Ouch!
Hope to hear from you soon as I need to release a Beta...
Michal Blazejczyk
Another fun fact: each time such a large grid is redrawn, memory usage goes up by about 30-50 MB!
Ouch!
Hope to hear from you soon as I need to release a Beta...
Michal Blazejczyk
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec
Michal Blazejczyk
Lead Programmer
Genome Quebec
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Michal,
Which version of TeeChart are you using? Could you please download the latest debug version to see if there's any improvement?
Thanks in advance.
Which version of TeeChart are you using? Could you please download the latest debug version to see if there's any improvement?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |