Fix for memory leak when opening Show View
authorteknolog
Sun, 04 Apr 2010 18:38:49 +0100
changeset 113 50345a6ad0c3
parent 112 0bd6b9a3f027
child 114 27f6f5827e5d
Fix for memory leak when opening Show View
application/src/PodcastFeedView.cpp
application/src/PodcastSearchView.cpp
engine/inc/PodcastModel.h
engine/src/PodcastModel.cpp
--- a/application/src/PodcastFeedView.cpp	Sun Apr 04 18:14:15 2010 +0100
+++ b/application/src/PodcastFeedView.cpp	Sun Apr 04 18:38:49 2010 +0100
@@ -217,7 +217,6 @@
 
 			if(index >= 0 && index < sortedItems->Count())
 				{
-				iPodcastModel.ActiveShowList().Reset();
 				iPodcastModel.SetActiveFeedInfo((*sortedItems)[index]);			
 				iViewingShows = ETrue;
 				AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID,  TUid::Uid(0), KNullDesC8());
@@ -615,7 +614,6 @@
 					{
 					CFeedInfo *info = iPodcastModel.FeedEngine().GetFeedInfoByUid(newFeedInfo->Uid());
 					
-					iPodcastModel.ActiveShowList().Reset();
 					iPodcastModel.SetActiveFeedInfo(info);			
 					AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID,  TUid::Uid(0), KNullDesC8());
 					iPodcastModel.FeedEngine().UpdateFeedL(newFeedInfo->Uid());
--- a/application/src/PodcastSearchView.cpp	Sun Apr 04 18:14:15 2010 +0100
+++ b/application/src/PodcastSearchView.cpp	Sun Apr 04 18:38:49 2010 +0100
@@ -245,7 +245,6 @@
 							{
 							CFeedInfo *info = iPodcastModel.FeedEngine().GetFeedInfoByUid(newInfo->Uid());
 							
-							iPodcastModel.ActiveShowList().Reset();
 							iPodcastModel.SetActiveFeedInfo(info);			
 							AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID,  TUid::Uid(0), KNullDesC8());
 							iPodcastModel.FeedEngine().UpdateFeedL(info->Uid());
--- a/engine/inc/PodcastModel.h	Sun Apr 04 18:14:15 2010 +0100
+++ b/engine/inc/PodcastModel.h	Sun Apr 04 18:38:49 2010 +0100
@@ -88,9 +88,6 @@
 	void DropDB();
 	void ResetDB();
 	
-	IMPORT_C void GetAllShowsL();
-	IMPORT_C void GetNewShowsL();
-	IMPORT_C void GetShowsDownloadedL();
 	IMPORT_C void GetShowsDownloadingL();
 	IMPORT_C void GetShowsByFeedL(TUint aFeedUid);
 	IMPORT_C void MarkSelectionPlayedL();
--- a/engine/src/PodcastModel.cpp	Sun Apr 04 18:14:15 2010 +0100
+++ b/engine/src/PodcastModel.cpp	Sun Apr 04 18:38:49 2010 +0100
@@ -417,7 +417,6 @@
 	CleanupStack::PopAndDestroy(table);
 	}
 	
-	
 TInt CPodcastModel::GetIapId()
 	{
 	_LIT(KSetting, "IAP\\Id");
@@ -426,24 +425,6 @@
 	return iapId;
 	}
 
-EXPORT_C void CPodcastModel::GetAllShowsL()
-	{
-	iActiveShowList.ResetAndDestroy();
-	iShowEngine->GetAllShowsL(iActiveShowList);
-	}
-
-EXPORT_C void CPodcastModel::GetNewShowsL()
-	{
-	iActiveShowList.ResetAndDestroy();
-	iShowEngine->GetNewShowsL(iActiveShowList);	
-	}
-
-EXPORT_C void CPodcastModel::GetShowsDownloadedL()
-	{
-	iActiveShowList.ResetAndDestroy();
-	iShowEngine->GetShowsDownloadedL(iActiveShowList);
-	}
-
 EXPORT_C void CPodcastModel::GetShowsDownloadingL()
 	{
 	iActiveShowList.ResetAndDestroy();
@@ -452,6 +433,7 @@
 
 EXPORT_C void CPodcastModel::GetShowsByFeedL(TUint aFeedUid)
 	{
+	DP1("iActiveShowList.Count()=%d", iActiveShowList.Count());
 	iActiveShowList.ResetAndDestroy();
 	iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid);
 	}