[mythtv] memory leak in MainServer::FillStatusXML

Isaac Richards ijr at case.edu
Tue Jul 5 04:48:13 UTC 2005


On Sunday 03 July 2005 02:55 pm, George Nassas wrote:
> On 1-Jul-05, at 2:41 AM, George Nassas wrote:
> > Also, ProgramInfo::GetProgramRecordingProfile is leaking for me. The
> > class hierarchy is a bit much for 2am, I'm hoping someone familiar
> > with that stuff can go "aha". If not I'll chase it down.
>
> I've narrowed this one down to the "rootGroup = new
> RootSRGroup(*this);" at the end of ScheduledRecording's constructor.
> Unfortunately that has pulled me into its base class which is the
> hornets nest known as managedlist.cpp. I haven't mastered that one yet
> but I have noticed that RootSRGroup is using the compiler-supplied copy
> constructor for ScheduledRecording. Is this intentional?

It shouldn't be using a copy of the object like that, no.

> My understanding is in these cases memcpy will be used and that's
> definitely incompatible with the QStrings contained in that class. FWIW
> creating a constructor with a simple list of assignments doesn't plug
> the leak so it must be somewhere in the ManagedList hierarchy.

Not true.  It'll use defined copy-constructors if they exist, which is 
completely safe for QString.

Isaac


More information about the mythtv-dev mailing list