[Qgis-developer] Plugin Memory Leak

Martin Dobias wonder.sk at gmail.com
Tue Aug 3 07:51:02 EDT 2010


On Tue, Aug 3, 2010 at 11:23 AM, Dario Magri <dario.magri at gmail.com> wrote:
> Hi,
> I have a Qgis plugin C++. I have subclassing QgisVertexMarker because I wont
> show on my application my custom icon.
> This is my code:
> [...]
>     case ICON_CUSTOM:
>  QPixmap pixmap(QSize(48,48));
>  pixmap.load(m_xFileName);
>       p->drawPixmap(0, 0,pixmap);
> [...]
>
> Whe on my plugin I use my custom VertexMarke Qgis after few second crash. If
> I use standard QgisVertexMarker the program work correctly.
> Can anyone help me please??

Dario,

it's hard to tell from your code snippet. The code looks fine at the
first sight (although it would be better to load the pixmap just once
when the file name is set and then just draw it). Try to run the
application in a debugger to find out where the crash takes place -
that might help you to understand the problem.

Regards
Martin


More information about the Qgis-developer mailing list