Review Request: fix (possible) mem leak in kbookmarkmenu class

Christoph Feck christoph at maxiom.de
Mon Oct 11 23:59:37 BST 2010



> On 2010-10-11 22:50:12, David Faure wrote:
> > This behavior change will result in crashes. See kdebase/apps/konqueror/src/konqbookmarkbar.cpp, where the list of parents (the KBookmarkActionMenus) is deleted before the list of KBookmarkMenus. With this patch, it will result in double-deletion.
> > 
> > Make it a KDE 5 TODO, add a comment in the docu about this being a qobject without a parent, but it can't be fixed.

Yep, I just added qDebug() inside constructor and destructor (before reading your comment). When running Konqueror, the BookmarkMenu is created and deleted, when running rekonq, it is only created. So the leak should be worked around in rekonq for now.


- Christoph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5606/#review8082
-----------------------------------------------------------


On 2010-10-11 21:48:02, Andrea Diamantini wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5606/
> -----------------------------------------------------------
> 
> (Updated 2010-10-11 21:48:02)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> I think this mini patch should fix a mem leak in kbookmarkmenu, letting its ctor have a parent. 
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kio/bookmarks/kbookmarkmenu.cc 1184934 
> 
> Diff: http://svn.reviewboard.kde.org/r/5606/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrea
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101011/9aba9443/attachment.htm>


More information about the kde-core-devel mailing list