[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-plotutils] memory leaks when using libplotter
From: |
Lukasz Grabowski |
Subject: |
[Bug-plotutils] memory leaks when using libplotter |
Date: |
Thu, 1 May 2008 17:36:59 +0200 |
Hi, the following code grows up to 5% of memory of my 512Mb laptop:
#include <plotter.h>
int main() {
XPlotter ploter(cin, cout, cerr);
ploter.openpl();
ploter.fspace (0, 0, 10, 10);
for(int i=0;i<100000;i++){
ploter.fontsize(20);
usleep(10);
}
ploter.closepl();
cin.get();
return 1;
}
The same happens when using double buffering, which makes longer
animations that change parameters (fontsize, pencolor, etc...)
impossible with libplotter:
#include <plotter.h>
int main() {
XPlotter ploter(cin, cout, cerr);
ploter.parampl("USE_DOUBLE_BUFFERING", (void*) "yes");
ploter.openpl();
ploter.fspace (0, 0, 10, 10);
for(int i=0;i<100000;i++){
ploter.fontsize(20);
ploter.erase();
usleep(10);
}
ploter.closepl();
cin.get();
return 1;
}
Best regards,
Lukasz Grabowski
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-plotutils] memory leaks when using libplotter,
Lukasz Grabowski <=