[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Possible memory leak in kfilebookmarkhandler.cpp
From: Waldo Bastian <bastian () kde ! org>
Date: 2003-12-28 21:55:47
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun December 28 2003 22:44, Waldo Bastian wrote:
> On Sun December 28 2003 22:12, Albert Astals Cid wrote:
> > Hi i think kfilebookmarkhandler.cpp is leaking some memory.
>
> [Snip]
>
> > 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)
>
> Yes, I think so too, unfortunately when doing that things starts to crash.
>
> Looking into it.
>
> Cheers,
> Waldo
This seems to fix it. Please review.
Cheers,
Waldo
- --
bastian@kde.org -=|[ KDE: K Desktop for the Enterprise ]|=- bastian@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/71FjN4pvrENfboIRAmm2AKCFMMKdy/JgKtQuQTZDpeil5x9TbgCgnAat
MUo+USSRRiTSNQIQSIkaCCU=
=a91Q
-----END PGP SIGNATURE-----
["bookmarkmenu_leak.patch" (text/x-diff)]
Index: kfilebookmarkhandler.cpp
===================================================================
RCS file: /home/kde/kdelibs/kio/kfile/kfilebookmarkhandler.cpp,v
retrieving revision 1.8
diff -u -r1.8 kfilebookmarkhandler.cpp
--- kfilebookmarkhandler.cpp 17 Mar 2003 23:23:47 -0000 1.8
+++ kfilebookmarkhandler.cpp 28 Dec 2003 21:51:31 -0000
@@ -56,7 +56,7 @@
KFileBookmarkHandler::~KFileBookmarkHandler()
{
- // delete m_bookmarkMenu; ###
+ delete m_bookmarkMenu;
}
QString KFileBookmarkHandler::currentURL() const
Index: kfiledialog.cpp
===================================================================
RCS file: /home/kde/kdelibs/kio/kfile/kfiledialog.cpp,v
retrieving revision 1.365
diff -u -r1.365 kfiledialog.cpp
--- kfiledialog.cpp 19 Dec 2003 14:29:04 -0000 1.365
+++ kfiledialog.cpp 28 Dec 2003 21:51:32 -0000
@@ -187,6 +187,7 @@
config->sync();
+ delete d->bookmarkHandler; // Should be deleted before ops!
delete ops;
delete d;
}
>> 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