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.


Stuart

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();
 }
 
 void EITHelper::ClearList(void)
Index: mythtv/libs/libmythtv/siparser.cpp
===================================================================
--- mythtv.orig/libs/libmythtv/siparser.cpp     2005-10-05 16:02:03.000000000 
+0100
+++ mythtv/libs/libmythtv/siparser.cpp  2005-10-07 09:33:47.000000000 +0100
@@ -1504,6 +1504,8 @@
 #endif
 
         ((EventHandler*) Table[EVENTS])->
+            Events[head->table_id_ext].remove(e.EventID);
+        ((EventHandler*) Table[EVENTS])->
             Events[head->table_id_ext][e.EventID] = e;
         e.clearEventValues();
         pos += descriptor_length;
Index: mythtv/libs/libmythtv/sitypes.cpp
===================================================================
--- mythtv.orig/libs/libmythtv/sitypes.cpp      2005-10-04 00:48:12.000000000 
+0100
+++ mythtv/libs/libmythtv/sitypes.cpp   2005-10-06 23:19:34.000000000 +0100
@@ -307,6 +307,7 @@
     CategoryType = "";
     OriginalAirDate = QDate();
     Credits.clear();
+    Actors = QStringList();
 }
 
 void TransportObject::Reset()
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to