aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 34279269..56bfb875 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2404,19 +2404,19 @@ ALCdevice_struct::~ALCdevice_struct()
BufferList.clear();
almtx_destroy(&BufferLock);
- ReleaseALEffects(this);
- std::for_each(EffectList.begin(), EffectList.end(),
- [](EffectSubList &entry) noexcept -> void
- { al_free(entry.Effects); }
- );
+ 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);
- ReleaseALFilters(this);
- std::for_each(FilterList.begin(), FilterList.end(),
- [](FilterSubList &entry) noexcept -> void
- { al_free(entry.Filters); }
- );
+ 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(&FilterLock);