01-26-2007 12:50 AM
Form1(
void){
InitializeComponent();
vals =
gcnew array<double>(60000) ; for (int i=0; i<60000; i++)vals[i]=Math::Sin(Math:: PI*2*60/6000.0*i) ;
}
and the click event looks like this:
System::Void button1_Click(System:: Object^ sender, System::EventArgs^ e)
{
this->waveformGraph1->Plots->Clear() ;NationalInstruments::UI::WaveformPlot^ plot =
gcnew NationalInstruments::UI::WaveformPlot(xAxis1, yAxis1) ;plot->PlotY(vals) ;
plot->LineColor = Color::Red ;
this->waveformGraph1->Plots->Add(plot) ;}
every time I click the button the memory used on my system goes up by about 10 MB. I tried this also with using this->waveformGraph1->PlotY(vals) and the memory usage stays solid as a rock.
Am I doing something wrong or what is causing the leak so I can work around it, my program plots 4 arrays of this size on one graph per test result.
01-30-2007 02:38 PM
01-31-2007 01:13 PM
02-01-2007 09:33 AM
02-01-2007 12:16 PM