From 82337dec44347017ca04fe975e85e6d9e4edb635 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 11 May 2014 16:59:19 +0200 Subject: InputStream: add virtual destructor Replaces the method Close(). --- src/playlist/CloseSongEnumerator.cxx | 2 +- src/playlist/PlaylistStream.cxx | 4 ++-- src/playlist/plugins/SoundCloudPlaylistPlugin.cxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/playlist') diff --git a/src/playlist/CloseSongEnumerator.cxx b/src/playlist/CloseSongEnumerator.cxx index 6a4042395..2dddef823 100644 --- a/src/playlist/CloseSongEnumerator.cxx +++ b/src/playlist/CloseSongEnumerator.cxx @@ -24,7 +24,7 @@ CloseSongEnumerator::~CloseSongEnumerator() { delete other; - is->Close(); + delete is; } DetachedSong * diff --git a/src/playlist/PlaylistStream.cxx b/src/playlist/PlaylistStream.cxx index 6222a768d..5855c598b 100644 --- a/src/playlist/PlaylistStream.cxx +++ b/src/playlist/PlaylistStream.cxx @@ -50,7 +50,7 @@ playlist_open_path_suffix(const char *path_fs, Mutex &mutex, Cond &cond) if (playlist != nullptr) playlist = new CloseSongEnumerator(playlist, is); else - is->Close(); + delete is; return playlist; } @@ -85,7 +85,7 @@ playlist_open_remote(const char *uri, Mutex &mutex, Cond &cond) playlist = playlist_list_open_stream(*is, uri); if (playlist == nullptr) { - is->Close(); + delete is; return nullptr; } diff --git a/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx index 8f378ac9d..d9f62300b 100644 --- a/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx +++ b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx @@ -276,7 +276,7 @@ soundcloud_parse_json(const char *url, yajl_handle hand, done = true; } else { mutex.unlock(); - input_stream->Close(); + delete input_stream; return -1; } } @@ -304,7 +304,7 @@ soundcloud_parse_json(const char *url, yajl_handle hand, } mutex.unlock(); - input_stream->Close(); + delete input_stream; return 0; } -- cgit v1.2.3