qgis/Quantum-GIS — pull request #350 by matthias-kuhn (2012-12-10 22:33:23+00:00)
Title: Transfer ownership of widgets to C++ when pushed to the QgsMessageBar

Right now, createMessage transfers ownership of the created widget to python, but when pushed to the message bar, ownership is not transfered back.
This creates the need for python to keep a reference to the message until this gets removed from the messagebar. This is too much overhead for a simple message to be shown.

I'm not sure if the widget needs to be deleted only if its parent is the QgsMessageBar (as in the pull-request now) or in any case, because python will loose ownership anyway and memory will be leaked.

Any help from a sip expert is appreciated.