[mythtv] [patch] EIT memory leak

Daniel Kristjansson danielk at cuymedia.net
Sat Oct 8 01:31:15 UTC 2005


On Sat, 2005-10-08 at 00:58 +0100, Stuart Auchterlonie wrote:
> On Fri, Oct 07, 2005 at 02:23:11PM -0400, Daniel Kristjansson wrote:
> > On Fri, 2005-10-07 at 18:44 +0100, Stuart Auchterlonie wrote:
> > > Hello All,
> > > Here's a preliminary patch to fix the EIT memory leaks.
> > > It DOES NOT fix all of them, but it does fix the major ones.
> > > I'm putting this out there so people can leave things running
> > > happilly overnight without consuming too much memory, and because
> > > I won't get a chance to look at it for a few days.
> > Thanks for looking at this.
> > 
> > However...
> > Index: mythtv/libs/libmythtv/eithelper.cpp
> > ===================================================================
> > --- mythtv.orig/libs/libmythtv/eithelper.cpp    2005-10-04
> > 00:48:12.000000000 +0100
> > +++ mythtv/libs/libmythtv/eithelper.cpp 2005-10-06 23:17:00.000000000
> > +0100
> > @@ -27,6 +27,7 @@
> >      eitList_lock.lock();
> >      eitList.push_back(events);
> >      eitList_lock.unlock();
> > +    eventList->clear();
> >  }
> > 
> > I think this one should be done by the caller of HandleEIT()...
> 
> Thought about that, but this part of the code is asynchronous.
Qt Signals are not asynchronous..

> If you want the caller of HandleEIT to delete this then you will
> need a callback to say you've handled those events.
The eitList contains complete deep copies of the events in the
eventList. This may not be the most efficient thing in the world,
but it does mean the two lists are decoupled.

> btw. This is the biggest leak of them all....
I can imagine.

-- Daniel




More information about the mythtv-dev mailing list