From kde-devel Wed Jan 21 13:05:40 2004 From: Dominique Devriese Date: Wed, 21 Jan 2004 13:05:40 +0000 To: kde-devel Subject: Re: KControl leak and changes in some kcm modules Message-Id: <87d69dtpsr.fsf () student ! kuleuven ! ac ! be> X-MARC-Message: https://marc.info/?l=kde-devel&m=107469040026257 Albert Astals Cid writes: > Hi, today i discovered some memory leakage in kcontrol toplevel.cpp, > it was calling aboutData that returns a pointer to a KAboutData but > never deleting it. I tried to fix it, but then realized that some > kcm modules don't return a new KAboutData pointer each time. Some > return a class member and some have a static variable, but the most > return a new KAboutData each time, so i have looked at the CVS and > chagned the few that didn't return a new KAboutData each time to do > so. Here come the patches. How about changing it the other way around: make the ones that return a new KAboutData each time return a class member or static variable, and not deleting anything from kcontrol ? That way, we don't introduce any crashes or new mem leaks in third party apps, and BC is not broken. cheers domi >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<