aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-05 17:25:08 -0700
committerChris Robinson <[email protected]>2019-06-05 17:25:08 -0700
commit5f26205f8fb504c5f6fec3e2b02f0009a4f24be2 (patch)
tree606172569e4f406a11cbef0bd9bc3fc8d59c6d06 /Alc
parentf27e73989c9831cde96880edafb01e662a7de2db (diff)
Properly destroy other objects
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp4
-rw-r--r--Alc/alu.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 8378673d..b7be4f7b 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2462,14 +2462,14 @@ ALCcontext::~ALCcontext()
auto evt_vec = AsyncEvents->getReadVector();
while(evt_vec.first.len > 0)
{
- reinterpret_cast<AsyncEvent*>(evt_vec.first.buf)->~AsyncEvent();
+ al::destroy_at(reinterpret_cast<AsyncEvent*>(evt_vec.first.buf));
evt_vec.first.buf += sizeof(AsyncEvent);
evt_vec.first.len -= 1;
++count;
}
while(evt_vec.second.len > 0)
{
- reinterpret_cast<AsyncEvent*>(evt_vec.second.buf)->~AsyncEvent();
+ al::destroy_at(reinterpret_cast<AsyncEvent*>(evt_vec.second.buf));
evt_vec.second.buf += sizeof(AsyncEvent);
evt_vec.second.len -= 1;
++count;
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index 97ebf0cb..00867810 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -181,7 +181,7 @@ void aluInit(void)
void DeinitVoice(ALvoice *voice) noexcept
{
delete voice->mUpdate.exchange(nullptr, std::memory_order_acq_rel);
- voice->~ALvoice();
+ al::destroy_at(voice);
}