diff options
author | Chris Robinson <[email protected]> | 2018-11-25 17:51:39 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-25 17:51:39 -0800 |
commit | 5b2b96b24598636e35f1fe7ecf868b09571065d6 (patch) | |
tree | 274b3b5d962a6bb350f5cd27aec8410022def8fe | |
parent | 127ec026e7dd0722bd5fbc193a85cb28a95925f5 (diff) |
Don't explicitly clear vector objects in the destructor
-rw-r--r-- | Alc/alc.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 56bfb875..a3c6b5bd 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2390,37 +2390,33 @@ ALCdevice_struct::~ALCdevice_struct() { TRACE("%p\n", this); - if(Backend) - DELETE_OBJ(Backend); + DELETE_OBJ(Backend); Backend = nullptr; - almtx_destroy(&BackendLock); - size_t count{0u}; for(auto &sublist : BufferList) count += POPCNT64(~sublist.FreeMask); if(count > 0) WARN(SZFMT " Buffer%s not deleted\n", count, (count==1)?"":"s"); - BufferList.clear(); - almtx_destroy(&BufferLock); count = 0; for(auto &sublist : EffectList) count += POPCNT64(~sublist.FreeMask); if(count > 0) WARN(SZFMT " Effect%s not deleted\n", count, (count==1)?"":"s"); - EffectList.clear(); - almtx_destroy(&EffectLock); count = 0; for(auto &sublist : FilterList) count += POPCNT64(~sublist.FreeMask); if(count > 0) WARN(SZFMT " Filter%s not deleted\n", count, (count==1)?"":"s"); - FilterList.clear(); + + almtx_destroy(&BackendLock); + + almtx_destroy(&BufferLock); + almtx_destroy(&EffectLock); almtx_destroy(&FilterLock); - HrtfList.clear(); if(HrtfHandle) Hrtf_DecRef(HrtfHandle); HrtfHandle = nullptr; |