[mythtv] [mythtv-commits] mythtv commit: r9285 - in trunk/mythtv by kkuphal

Kevin Kuphal kuphal at dls.net
Tue Mar 7 19:24:49 UTC 2006


Chris Pinkham wrote:
> * On Tue Mar 07, 2006 at 05:34:47PM +0000, mythtv at cvs.mythtv.org wrote:
>   
>>       Author: kkuphal
>>         Date: 2006-03-07 17:34:45 +0000 (Tue, 07 Mar 2006)
>> New Revision: 9285
>>    Changeset: http://cvs.mythtv.org/trac/changeset/9285
>>     
>
> Couple comments/questions:
>
> I think that you need to take out the tr() out of this line, the title should
> not be translated:
>
> 	subitem = new OSDGenericTree(item, tr(lastProgram->title), "JUMPPREV");
>   
Yeah, I can take care of that.
> And is this part going to cause a leak because we are setting TV::lastProgram
> without first deleting the old one?
>
>         while (tv->getJumpToProgram())
>         {
>             lastProgram = tv->getLastProgram();
>             ProgramInfo *tmpProgram = new ProgramInfo(*lastProgram);
>
>             lastProgram = new ProgramInfo(*tvrec);
>             tv->setLastProgram(lastProgram);
>
> We get the lastProgram, make a copy of it, make a copy of tvrec,
> then assign the copy to TV::lastProgram.  Are we freeing the current
> value in TV::lastProgram somewhere that I'm not seeing?
>   
I *believe* it gets deleted when the progLists.clear() is executed.  At 
least, I was getting a segfault when I tried to delete it in that 
section of code above because I think it was doing a double delete.

> Haven't tried it yet, but nice feature. :)  My WAF will go up as she likes
> to flip around and watch other stuff for 5 minutes when I get up and leave
> the room to take the dog out or something.
>   
Yup, that's pretty much what I use it for, although in reverse when my 
wife gets up frequently.

Kevin


More information about the mythtv-dev mailing list