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

List:       kde-core-devel
Subject:    memleak in kate part
From:       Jesse Yurkovich <yurkjes () iit ! edu>
Date:       2002-08-07 7:21:53
[Download RAW message or body]

While looking through katecodefoldinghelpers.cpp I found a memleak.

The KateCodeFoldingTree::KateCodeFoldingTree ctor makes a call to the 
KateCodeFoldingNode () ctor which allocates memory for its childnodes, but 
KateCodeFoldingTree also allocates memory for these children as well ...
attached is the diff, but I havent had time to set up a 'proper' cvs tree yet. 
The patch applies cleanly though ...

Also, I've done a fairly large white-space/indention/style cleanup for 
katecodefoldinghelpers.cpp and I was wondering if it was also ok to submit 
this patch here as well. 

-Jesse


["patch.diff" (text/x-diff)]

--- katecodefoldinghelpers.cpp	Thu May  2 16:58:20 2002
+++ katecodefoldinghelpers2.cpp	Wed Aug  7 02:06:42 2002
@@ -55,7 +55,6 @@ KateCodeFoldingTree::KateCodeFoldingTree
 	startLineValid=true;
 	endLineValid=true; // temporary, should be false;
 	endLineRel=60000;   // temporary;
-	childnodes=new QPtrList<KateCodeFoldingNode>; // since the root node has most \
probably child nodes allocate it  }
 
 KateCodeFoldingTree::~KateCodeFoldingTree(){;}



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

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