Skip to content

Fix some memory leakages

Will forward-port to master directly.

@aacid @heikobecker

Found by valgrind (thanks to @heikobecker for giving a log). Examples:

==349341== 56 bytes in 1 blocks are definitely lost in loss record 1,978 of 2,217
==349341==    at 0x483FF3F: operator new(unsigned long) (vg_replace_malloc.c:472)
==349341==    by 0x15A78C: IntroSprite::addPause(int) [clone .isra.0] (introsprite.cpp:135)
==349341==    by 0x1314E3: UnknownInlinedFun (displayintro.cpp:473)
==349341==    by 0x1314E3: DisplayIntro::advance() (displayintro.cpp:361)
==349341==    by 0x5D97F8F: UnknownInlinedFun (qobjectdefs_impl.h:433)
==349341==    by 0x5D97F8F: void doActivate<false>(QObject*, int, void**) (qobject.cpp:4021)
==349341==    by 0x5D9DDC3: UnknownInlinedFun (moc_qtimer.cpp:272)
==349341==    by 0x5D9DDC3: UnknownInlinedFun (qtimer.cpp:252)
==349341==    by 0x5D9DDC3: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:246)
==349341==    by 0x5D8BD2D: QObject::event(QEvent*) (qobject.cpp:1414)
==349341==    by 0x4E50E7A: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3290)
==349341==    by 0x5D4DCD7: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1118)
==349341==    by 0x5E7EFAD: UnknownInlinedFun (qcoreapplication.cpp:1536)
==349341==    by 0x5E7EFAD: QTimerInfoList::activateTimers() (qtimerinfo_unix.cpp:507)
==349341==    by 0x5F2FAC3: timerSourceDispatch(_GSource*, int (*)(void*), void*) (qeventdispatcher_glib.cpp:149)
==349341==    by 0x7AF2063: g_main_dispatch.lto_priv.0 (gmain.c:3476)
==349341==    by 0x7B49FB6: UnknownInlinedFun (gmain.c:4284)
==349341==    by 0x7B49FB6: g_main_context_iterate_unlocked.isra.0 (gmain.c:4349)

and

==349341== 344 (24 direct, 320 indirect) bytes in 1 blocks are definitely lost in loss record 2,164 of 2,217
==349341==    at 0x483FF3F: operator new(unsigned long) (vg_replace_malloc.c:472)
==349341==    by 0x126F64: ButtonSprite::ButtonSprite(bool, QString const&, ThemeManager*, int, QGraphicsScene*) (buttonsprite.cpp:32)
==349341==    by 0x12F637: DisplayIntro::DisplayIntro(QGraphicsScene*, ThemeManager*, QGraphicsView*) (displayintro.cpp:96)
==349341==    by 0x155301: UnknownInlinedFun (kwin4view.cpp:109)
==349341==    by 0x155301: KWin4App::KWin4App(QWidget*) [clone .constprop.0] (kwin4.cpp:122)
==349341==    by 0x126993: main (main.cpp:99)
Edited by Friedrich W. H. Kossebau

Merge request reports

Loading