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

@@ -271,7 +271,7 @@ decoder_run_stream(Decoder &decoder, const char *uri)
decoder_run_stream_fallback(decoder, *input_stream));
dc.Unlock();
input_stream->Close();
delete input_stream;
dc.Lock();
return success;
@@ -318,7 +318,7 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix,
dc.Unlock();
input_stream->Close();
delete input_stream;
if (success) {
dc.Lock();

View File

@@ -467,7 +467,7 @@ wavpack_open_wvc(Decoder &decoder, const char *uri,
size_t nbytes = decoder_read(decoder, *is_wvc,
&first_byte, sizeof(first_byte));
if (nbytes == 0) {
is_wvc->Close();
delete is_wvc;
return nullptr;
}
@@ -519,7 +519,7 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
WavpackCloseFile(wpc);
if (open_flags & OPEN_WVC) {
is_wvc->Close();
delete is_wvc;
}
}