InputStream: add virtual destructor

Replaces the method Close().
This commit is contained in:
Max Kellermann
2014-05-11 16:59:19 +02:00
parent f1d0700252
commit 82337dec44
31 changed files with 48 additions and 180 deletions

View File

@@ -24,7 +24,7 @@
CloseSongEnumerator::~CloseSongEnumerator()
{
delete other;
is->Close();
delete is;
}
DetachedSong *

View File

@@ -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;
}

View File

@@ -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;
}