kdevelop patch.

jbb jbb at kdevelop.org
Thu Mar 28 08:11:02 UTC 2002


Hi Harald,

Excellent catch :-))

Thanks for fixing this

jbb

Hi,

> The first one might fix the following leak trapped by valgrind

whoops... sorry, your first patch crashes KDevelop if you open a project, 
close it and open another one again. The problem is that the QPtrDict "dict" 
is set to autoDelete, so it deletes all its members -> double deletion crash.

The memory leak occurs because "dict" doesn't get deleted in the destructor, 
so it never deletes its contents. This patch should fix it:

Index: clogfileview.cpp
===================================================================
RCS file: /home/kde/kdevelop/kdevelop/Attic/clogfileview.cpp,v
retrieving revision 1.28.2.3.2.10.2.5
diff -u -3 -p -r1.28.2.3.2.10.2.5 clogfileview.cpp
--- clogfileview.cpp    2002/01/31 00:25:53     1.28.2.3.2.10.2.5
+++ clogfileview.cpp    2002/03/24 23:23:16
@@ -64,6 +64,7 @@ CLogFileView::CLogFileView(bool s_path,
 }

 CLogFileView::~CLogFileView(){
+  delete dict;
 }



_______________________________________________
Kdevelop-devel mailing list
Kdevelop-devel at barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel








More information about the KDevelop-devel mailing list