InputStream: add virtual destructor
Replaces the method Close().
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
CloseSongEnumerator::~CloseSongEnumerator()
|
||||
{
|
||||
delete other;
|
||||
is->Close();
|
||||
delete is;
|
||||
}
|
||||
|
||||
DetachedSong *
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user