Page 1 of 1

Memory management

Posted: Thu Feb 24, 2011 8:53 am
by 15052763
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.

Re: Memory management

Posted: Fri Feb 25, 2011 2:56 pm
by narcis
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.