[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: add to kdebug.areas
From: David Faure <david () mandrakesoft ! com>
Date: 2001-04-02 11:18:49
[Download RAW message or body]
On Sunday 01 April 2001 09:34, Sergio Moretti wrote:
> On Saturday 31 March 2001 23:56, David Faure wrote:
> > On Saturday 31 March 2001 09:58, Sergio Moretti wrote:
> > > Hi,
> > > Could anyone add to kdebug.areas the following, for kmago
> > > application:
> > >
> > > 41000 kmago (ini)
> > > 41001 kmago (vie)
> > > 41002 kmago (run)
> > > 41003 kmago (prs)
> >
> > Hmm, why not, but I wonder what's the point since kmago isn't in CVS
> > ? I guess there aren't that many kmago developers, so you can simply
> > patch your kdebug.areas file, no ? Just wondering.
>
> the problem is that I use kdDebug with that codes, and I publish this
> application, so I have two way, one, to add to install Makefile's
> target an hack to update the kdebug.areas file, the second, to ask you
> to add it :)
>
> The main reason behind this is the fact that if I run it without the
> codes inserted, a misteriously memory leakage pops up in some kdDebug
> calls.
There's nothing mysterious in KDE's code ;-)
I think I found the reason for the leak.
Unknown area numbers were leading to the whole kdebug.areas
to be parsed and inserted into the cache every time.
This should help :
Index: kdebug.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kdebug.cpp,v
retrieving revision 1.87
diff -u -p -r1.87 kdebug.cpp
--- kdebug.cpp 2001/01/30 01:37:15 1.87
+++ kdebug.cpp 2001/04/02 11:17:49
@@ -80,6 +80,9 @@ static QString getDescrFromNum(unsigned
KDebugEntry *ent = KDebugCache->find( _num );
if ( ent )
return ent->descr;
+
+ if ( !KDebugCache->isEmpty() ) // areas already loaded
+ return QString::null;
QString data, filename(locate("config","kdebug.areas"));
QFile file(filename);
Thanks for noticing this.
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
>> Visit http://master.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