Closing file handles directly after they've been payed
This commit is contained in:
parent
ad0d966bd8
commit
9c3c0250c1
@ -73,6 +73,8 @@ namespace tc::audio::sounds {
|
||||
void finalize(bool is_destructor_call) {
|
||||
if(this->output_source && global_audio_output)
|
||||
global_audio_output->delete_source(this->output_source);
|
||||
if(this->file_handle)
|
||||
this->file_handle = nullptr;
|
||||
if(auto buffer{std::exchange(this->cache_buffer, nullptr)}; buffer)
|
||||
::free(buffer);
|
||||
if(!is_destructor_call)
|
||||
|
Loading…
Reference in New Issue
Block a user