[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Possible memory leak in kfilebookmarkhandler.cpp
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2003-12-28 21:12:04
[Download RAW message or body]

Hi i think kfilebookmarkhandler.cpp is leaking some memory.

I was using valgrind in ktuberling and I've found that if i use the open 
option (KFileDialog::getOpenURL), when i close ktuberling, valgrind reports

==13957== 128 bytes in 1 blocks are definitely lost in loss record 153 of 223
==13957==    at 0x3C01C4D8: operator new(unsigned) (vg_replace_malloc.c:107)
==13957==    by 0x3C5C53B8: 
KFileBookmarkHandler::KFileBookmarkHandler(KFileDialog*) 
(kfilebookmarkhandler.cpp:53)
==13957==    by 0x3C55DE53: KFileDialog::init(QString const&, QString const&, 
QWidget*) (kfiledialog.cpp:914)
==13957==    by 0x3C559C41: KFileDialog::KFileDialog(QString const&, QString 
const&, QWidget*, char const*, bool) (kfiledialog.cpp:168)

So it says that m_bookmarkMenu should be deleted.

This is when only using the open option one time, if used more times the 
number of leaked bytes grow.

So i think m_bookmarkMenu should be deleted in the destructor (is already 
there but commented)

Albert.

P.S: I have fixed similar memory leaks in kdegames but kdelibs is a different 
level for me, so this is why i am sending this e-mail to the list.

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic