Memory management

TeeChart for ActiveX, COM and ASP
Post Reply
Gropius
Newbie
Newbie
Posts: 1
Joined: Fri Mar 06, 2009 12:00 am

Memory management

Post by Gropius » Thu Feb 24, 2011 8:53 am

Hi,

we are using TeeChart Pro ActiveX 8.0 (8.0.1.0) in our native C++ application.
We have 2 teechart components containing fastline series (TeeChart::scFastLine).(See sample picture attached)

We figure out that teechart allocates a lot of memory.

When will the memory be released?
- We run teeChart()->Series(m_seriesDCIndex)->Clear(); to reset series data.
Does this release the memory allocated by the teechart component?
- When deleting the teechart component ( in additon, we use them inside a dialog) it seemed we need to call RemoveAllSeries(); to delete the memory.
Deleting the component seemed not to be enough.

What is the recommended way to cleanup memory allocated by the teechart component?

Thanks for your help or comments.
Attachments
sample.png
Sample application picture
sample.png (155.48 KiB) Viewed 4192 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Memory management

Post by Narcís » Fri Feb 25, 2011 2:56 pm

Hi Gropious,
We figure out that teechart allocates a lot of memory.
Most of the memory allocated by TeeChart is for series data, it's necessary to paint the series and other chart elements accordingly.
When will the memory be released?
When closing a form with a TeeChart object in it, its destructor should do the job.
- We run teeChart()->Series(m_seriesDCIndex)->Clear(); to reset series data.
Does this release the memory allocated by the teechart component?
Yes, I'd hope so.
- When deleting the teechart component ( in additon, we use them inside a dialog) it seemed we need to call RemoveAllSeries(); to delete the memory.
Deleting the component seemed not to be enough.
Do you have a project we can run "as-is" to reproduce the issue here?
What is the recommended way to cleanup memory allocated by the teechart component?
As I told you before, built-in destructors should free allocated memory.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply