# HG changeset patch # User teknolog # Date 1270402729 -3600 # Node ID 50345a6ad0c3f5e059abd8c28c1ef9ca9b6195ca # Parent 0bd6b9a3f027336fd162730bb055f92f97fd9750 Fix for memory leak when opening Show View diff -r 0bd6b9a3f027 -r 50345a6ad0c3 application/src/PodcastFeedView.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()); diff -r 0bd6b9a3f027 -r 50345a6ad0c3 application/src/PodcastSearchView.cpp --- 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()); diff -r 0bd6b9a3f027 -r 50345a6ad0c3 engine/inc/PodcastModel.h --- 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(); diff -r 0bd6b9a3f027 -r 50345a6ad0c3 engine/src/PodcastModel.cpp --- 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); }