===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videomanager.cpp,v
retrieving revision 1.38
diff -u -r1.38 videomanager.cpp
--- mythvideo/videomanager.cpp 19 Sep 2004 13:45:51 -0000 1.38
+++ mythvideo/videomanager.cpp 17 Dec 2004 09:43:15 -0000
@@ -648,6 +648,12 @@
ltype->ResetList();
ltype->SetActive(true);
+ if (curitem)
+ {
+ delete curitem;
+ curitem = NULL;
+ }
+
for (it = start; it != end; ++it)
{
if (cnt < listsize)
@@ -666,8 +672,6 @@
if (cnt == inList)
{
- if (curitem)
- delete curitem;
curitem = new Metadata(*(it));
ltype->SetItemCurrent(cnt);
}
I've not had a look at the code so apologies for wasting your time if this is incorrect, but judging by the line numbers in the diff the second part looks as if it's in the above part's for loop...
If this is the case, does your change not introduce a memory leak in that issues curitem = new Metadata(*(it)); on each iteration without ever deleting the one allocated on the previous iteration?
Col.
--
+------------------------+ | Colin Guthrie | +------------------------+ | [EMAIL PROTECTED] | | http://colin.guthr.ie/ | +------------------------+
_______________________________________________ mythtv-dev mailing list [EMAIL PROTECTED] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev