+
+ while( p_playlist->i_sds )
+ {
+ playlist_ServicesDiscoveryRemove( p_playlist,
+ p_playlist->pp_sds[0]->psz_module );
+ }
+
+ playlist_MLDump( p_playlist );
+
+ PL_LOCK;
+ /* Go through all items, and simply free everything without caring
+ * about the tree structure. Do not decref, it will be done by doing
+ * the same thing on the input items array */
+ FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )
+ free( p_del->pp_children );
+ free( p_del );
+ FOREACH_END();
+ ARRAY_RESET( p_playlist->all_items );
+
+ FOREACH_ARRAY( input_item_t *p_del, p_playlist->input_items )
+ input_ItemClean( p_del );
+ free( p_del );
+ FOREACH_END();
+ ARRAY_RESET( p_playlist->input_items );
+
+ ARRAY_RESET( p_playlist->items );
+ ARRAY_RESET( p_playlist->current );
+
+ PL_UNLOCK;