add single instance mode
[uwplayer.git] / application / playlist.c
index e32110d..89c276b 100644 (file)
@@ -32,6 +32,7 @@
 
 void PlayListInit(MainWindow *win) {
     win->playlist.tracks = cxArrayListCreate(cxDefaultAllocator, NULL, CX_STORE_POINTERS, 64);
+    win->playlist.tracks->simple_destructor = free;
     win->playlist.current_track = -1;
 }
 
@@ -77,3 +78,7 @@ void PlayListPlayTrack(MainWindow *win, int i) {
         }
     }
 }
+
+void PlayListClear(MainWindow *win) {
+    cxListClear(win->playlist.tracks);
+}