If the width or height changes this leaks memory. You need to check if doubleBuffer exists and call delete before you create the new pixmap.
static QPixmap *doubleBuffer = 0;
if (!doubleBuffer || doubleBuffer->width() != width() || doubleBuffer->height() != height())
{
doubleBuffer = new QPixmap(width(), height());
}
Thanks mate. patched in latest commit r62
Why did you use a static buffer ?
If they are two QMapControl components with two different dimensions, that occurs two delete-new allocation at every paintEvent call.
you're absolutely right! no need to be static, i'll correct in next merge.
re-opening bug
Please notice that when we produce multiple instances of MapControl, it could generate some failures with ImageManager Singleton.
For example, in __init() method of MapControl, you make connections between ImageManager and MapControl instance. The signal imageReceived() is emitted twice to each MapControl if you instanciate two MapControl. Then we are four signals emitted instead of two.
Good luck.
sorry for the long delay, I've been super busy at work
fixed up in latest commit; also addressed singleton issues with multiple instances of the widget
cheers