[mythtv] Memory leaks in SVN

Jim Westfall jwestfall at surrealistic.net
Thu Apr 13 04:41:09 UTC 2006


Stuart Auchterlonie <stuarta at squashedfrog.net> wrote [04.12.06]:
> On Wed, Apr 12, 2006 at 08:01:32AM +0100, Ed Wildgoose wrote:
> > 
> > Thanks for the tip.  It's looking like it might in part be the preview 
> > stream which is leaking.  As I scroll up and down the recorded programs 
> > page memory is leaking.  Not sure yet if this explains all the leak when 
> > playing and quiting watching a program though.
> 
> There is a problem with the preview video. IIRC it leaks threads on a fast
> CPU. I'm running a local patch that disables that but still see the leaks
> in the frontend. I'll attach my patch for reference
> 
> Stuart
> 

Try this.  MHIContext isnt joining to the thread its creating.  This 
stopped ~10megs leak per nvp::openfile()/new afd for me.

Index: libs/libmythtv/mhi.cpp
===================================================================
--- libs/libmythtv/mhi.cpp      (revision 9638)
+++ libs/libmythtv/mhi.cpp      (working copy)
@@ -94,6 +94,7 @@
             m_engine_wait.wakeAll();
             usleep(1000);
         }
+        pthread_join(m_engineThread, NULL);
     }
 }



More information about the mythtv-dev mailing list