Hi Sai,
I am not aware of any memory leak issues in CChartViewer or in ChartDirector. If you think there is a memory leak, is it possible to create a simple example (eg. by modifying the HelloWorld sample code) that can illustrate the leak?
In ChartDirector, the memory rules are:
(a) If you need to eventually use "delete" to delete a ChartDirector object if and only if you have created object using "new".
(b) If you use DrawArea.text to create a TTFText object, you should call TTFText.destroy to delete it.
(c) MFC objects, like CChartViewer, should be treated just like any other standard MFC object (just like a CStatic object), without any special handling required.
Hope this can help.
Regards
Peter Kwan |