Andre Poenitz wrote:
On Mon, Dec 03, 2007 at 11:00:00PM +0100, Peter Kümmel wrote:
Playing around with vld I came to the conclusion
that there is a memory leak in Qt's plugin system.

When I trace the allocations of Qt
(see ForceIncludeModules in the vld.ini file)
I get attached output after just opening and closing lyx.


It traces down to the macro in src/corelib/plugin/qplugin.h
(macro from 4.4, similar in 4.3.2):

#define Q_PLUGIN_INSTANCE(IMPLEMENTATION) \
        { \
static QT_PREPEND_NAMESPACE(QPointer)<QT_PREPEND_NAMESPACE(QObject)> _instance; \
            if (!_instance)      \
                _instance = new IMPLEMENTATION; \
            return _instance; \
        }

Which plugin is this?

One of the image plugins.


Q_PLUGIN_INSTANCE is documented not to delete the instance, so this seems to 'unlucky, but documented behaviour'...

Any reason not to delete it?

--
Peter Kümmel

Reply via email to