[Kwintv] Patch to fix memory leak when lirc-support is in

Rizsanyi Zsolt kwintv@mail.kde.org
Tue, 15 Oct 2002 13:35:15 +0200


On Tuesday 15 October 2002 13:02, Morten Brix Pedersen wrote:
> Hi,
>
> * Rizsanyi Zsolt <rizsanyi@myrealbox.com> [2002-10-15 12:58:36]:
> > On Tuesday 15 October 2002 12:42, Morten Brix Pedersen wrote:
> > > Hi,
> > >
> > > This patch fixes a small memory leak when Lirc support is compiled in.
> >
> > Correct me if I'm wrong, but if an QObject has a declared parent, then it
> > will be automatically deleted when the parent is deleted.
>
> Really? OK, I didn't know that.
>
> I ran qtvision through LeakTracer (http://www.andreasen.org/LeakTracer/)
> and it found this to be a memory leak - but you may be right.
>
> > So this fix is not needed... (and even could cause a crash because of
> > double deletion)
>
> My added "delete lirc" doesn't make it crash.

I'm not a qt guru either. I just read that in the Qt documentation.
But if your leaktracer shows that, then maybe somebody with more knowledge 
could help us out.

Regards
Zsolt