[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KDE 1.1.2 khtmlw memory leak patch - please test!
From: Bo Thorsen <gobo () imada ! sdu ! dk>
Date: 1999-08-28 9:07:41
[Download RAW message or body]
On Sat, 28 Aug 1999, Bjarni R.
Einarsson wrote:
> Hi!
>
> Regarding http://bugs.kde.org/db/18/1812.html .
>
> I know I said I didn't know squat about Qt programming. Well I
> don't. But the lack of responses here on kfm-devel, some browsing
> of the khtmlw source code and "man qdict" inspired me to try
> anyway.
>
> Attached is an untested patch to fix the X/pixmap/cache memory
> leak in kdelibs/khtmlw. Yeah, I said untested. I don't have
> enough horsepower on my desk to build the KDE libs here at home,
> but I will test it when I get to work on Monday. Just compiling
> the khtmlw widget to check for syntax errors was painful enough!
One small change in the destructor:
HTMLCachedImage::~HTMLCachedImage( )
{
if (pixmap) delete pixmap;
pixmap = 0;
}
should be
HTMLCachedImage::~HTMLCachedImage( )
{
delete pixmap;
}
delete tests for the pointer being 0, and it does not make sense to assign
a variable in an object 2 milliseconds away from being deleted :-)
Wether your patch works I can't say, since I haven't tested it.
--
Bo Thorsen
gobo@imada.sdu.dk
Lahnsgade 31, st.
DK-5000 Odense C
Tlf: +45 66 11 83 85
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic