#define SORT_BY_ALBUM_AZ "SORT_BY_ALBUM_AZ"
#define SORT_BY_ALBUM_ZA "SORT_BY_ALBUM_ZA"
+/* for debugging */
+#define _eina_list_free(list) \
+{ \
+ if (!list) \
+ return; \
+ if (list->__magic != 0x98761237) { \
+ int *a = 0; \
+ *a = 1; \
+ } \
+ eina_list_free(list); \
+}
+
#endif /* __DEFINE_H__ */
}
if (!sort_flag) {
- if (m->catlist) {
+ if (m->catlist)
eina_list_free(m->catlist);
- m->catlist = NULL;
- }
+ m->catlist = NULL;
}
- if (m->alblist) {
- eina_list_free(m->alblist);
- m->alblist = NULL;
- }
+ // This value is just referenced from CCategoryInfo.
+ // So should not freed here.
+ m->alblist = NULL;
- if (m->songlist) {
+ if (m->songlist)
eina_list_free(m->songlist);
- m->songlist = NULL;
- }
+ m->songlist = NULL;
- if (m->it_infolist) {
+ if (m->it_infolist)
eina_list_free(m->it_infolist);
- m->it_infolist = NULL;
- }
+ m->it_infolist = NULL;
m->total_duration = 0;
m->mhandle = mhandle;
m->mgr = mgr;
m->parent = parent;
- m->catInfo = new CCategoryInfo;
- m->albumInfo = new CAlbumInfo;
Connect(layout, CATEGORY_SONGS_LAYOUT, TYPE_KEY_DOWN);
{
ASSERT(m);
- if (m->catInfo->FlagCreate()) {
- m->catInfo->Destroy();
- }
- delete m->catInfo;
-
- if (m->albumInfo->FlagCreate()) {
- m->albumInfo->Destroy();
- }
- delete m->albumInfo;
-
m_RemoveFocusIdler();
m_EmptySongList();
CExtBaseLayout::Destroy();
m->depth = depth;
m->selectType = selType;
-
- if (m->catInfo->FlagCreate())
- m->catInfo->Destroy();
-
- if (m->albumInfo->FlagCreate())
- m->albumInfo->Destroy();
-
- if (catInfo && catInfo->FlagCreate()) {
- m->catInfo->Create();
- m->catInfo->Duplicate(catInfo);
- }
-
- if (albumInfo && albumInfo->FlagCreate()) {
- m->albumInfo->Create();
- m->albumInfo->Duplicate(albumInfo);
- }
+ m->catInfo = catInfo;
+ m->albumInfo = albumInfo;
}