Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

memory leak using CWGraph

I have a memory leak problem using the CWGraph control.
I have an SDI application (MFC using Measurement Studio) and I generate dynamicaly a dialog containing a 2D Graph, and I use the OnTimer() of the dialog to generate data and to update the graph, with a timer of 50ms. In OnTimer() function I have a loop to generate
and to update two plots on the graph. When I call a method of the graph (for example for changing the color of the plot or for updating a plot (using PlotXvsY)), I have a periodic increasing of memory with a fixed amount of memory (4k). In the same OnTimer() function I update also some CWSlide controls without memory leaks.

If I comment the line that call a method of graph (ex. m_Graph.Plots.Item(1)....), the code works wit
hout memory leaks.

I'll apreciate any suggestion about this problem.
0 Kudos
Message 1 of 3
(3,379 Views)
Hi Dan,

Can you send me a simplified version of your MFC project that shows this memory leak? Once I reproduce it, I might be able to give you some suggestions.

Regards,
Azucena Perez
National Instruments
0 Kudos
Message 2 of 3
(3,378 Views)
It sounds unlikely, but did you possibly forget to call KillTimer() or the base class handler CDialog::OnTimer()?
0 Kudos
Message 3 of 3
(3,379 Views)