[Kget] Memory leaks?

Lukas Appelhans l.appelhans at gmx.de
Tue Apr 21 22:26:26 CEST 2009


> ################
> ==9590== 17,350 (1,440 direct, 15,910 indirect) bytes in 9 blocks are
> definitely lost in loss record 124 of 187
> ==9590==    at 0x40277EE: operator new(unsigned) (in /usr/lib/valgrind/x86-
> linux/vgpreload_memcheck.so)
> ==9590==    by 0x7DC1C66: TransferKioFactory::createTransfer(KUrl const&,
> KUrl const&, TransferGroup*, Scheduler*, QDomElement const*)
> (transferKioFactory.cpp:43)
> ==9590==    by 0x46C0DB0: KGet::createTransfer(KUrl const&, KUrl const&,
> QString const&, bool, QDomElement const*) (kget.cpp:711)
> ==9590==    by 0x46C1599: KGet::addTransfer(QDomElement const&, QString
> const&) (kget.cpp:227)
> ==9590==    by 0x46CBF1C: TransferGroup::load(QDomElement const&)
> (transfergroup.cpp:379)
> ==9590==    by 0x46BFCEA: KGet::load(QString) (kget.cpp:435)
> ==9590==    by 0x809D805: MainWindow::slotDelayedInit()
> (mainwindow.cpp:334) ==9590==    by 0x809E081:
> MainWindow::qt_metacall(QMetaObject::Call, int, void**)
> (mainwindow.moc:164)
> ==9590==    by 0x4B96C87: QMetaObject::activate(QObject*, int, int, void**)
> (in /usr/lib/libQtCore.so.4.5.0)
> ==9590==    by 0x4B98411: QMetaObject::activate(QObject*, QMetaObject
> const*, int, void**) (in /usr/lib/libQtCore.so.4.5.0)
> ==9590==    by 0x4B9C0F6: (within /usr/lib/libQtCore.so.4.5.0)
> ==9590==    by 0x4B9C21B: (within /usr/lib/libQtCore.so.4.5.0)
>
> Because the static KGet members excluding m_scheduler are not deleted
> (m_transferTreeModel in this case)
>
>
> ################
> ==9590== 15,418 (140 direct, 15,278 indirect) bytes in 7 blocks are
> definitely lost in loss record 126 of 187
> ==9590==    at 0x40277EE: operator new(unsigned) (in /usr/lib/valgrind/x86-
> linux/vgpreload_memcheck.so)
> ==9590==    by 0x7DC15D2:
> TransferKioFactory::createTransferHandler(Transfer*, Scheduler*)
> (transferKioFactory.cpp:50)
> ==9590==    by 0x46C79F8: Transfer::handler() (transfer.cpp:165)
> ==9590==    by 0x46C7A56: Transfer::setTransferChange(int, bool)
> (transfer.cpp:284)
> ==9590==    by 0x7DC0176: TransferKio::start() (transferKio.cpp:38)
> ==9590==    by 0x46C43A6: Scheduler::updateQueue(JobQueue*)
> (scheduler.cpp:199)
> ==9590==    by 0x46D3F1A:
> TransferGroupScheduler::jobQueueAddedJobEvent(JobQueue*, Job*)
> (transfergroupscheduler.cpp:39)
> ==9590==    by 0x46B94E1: JobQueue::append(Job*) (jobqueue.cpp:94)
> ==9590==    by 0x46CCFEF: TransferGroup::append(Transfer*)
> (transfergroup.cpp:98)
> ==9590==    by 0x46C5ABC: TransferTreeModel::addTransfer(Transfer*,
> TransferGroup*) (transfertreemodel.cpp:64)
> ==9590==    by 0x46C0FF2: KGet::createTransfer(KUrl const&, KUrl const&,
> QString const&, bool, QDomElement const*) (kget.cpp:714)
> ==9590==    by 0x46C1599: KGet::addTransfer(QDomElement const&, QString
> const&) (kget.cpp:227)
>
> I did not look into this one but I guess that the problem is similiar to
> the one above.
Wow those look nice :P

We should delete that stuff in deleteSelf() imo...

Lukas


More information about the Kget mailing list