KControl leak and changes in some kcm modules
Dominique Devriese
dominique.devriese at student.kuleuven.ac.be
Wed Jan 21 13:05:40 GMT 2004
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
More information about the kde-core-devel
mailing list