aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-27 10:44:02 -0800
committerChris Robinson <[email protected]>2018-12-27 10:44:02 -0800
commit4dca2f2ee5ef488fbe05397de1ab3029e559cf61 (patch)
tree930224ac816f69b0ca0a7cd0c97e647d6e04da57 /Alc/alc.cpp
parentbe85ab6f826a724105cef05e740b5013a1e6149e (diff)
Use a unique_ptr for the AsyncEvents ringbuffer
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 27475652..9a93fbdc 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2369,7 +2369,7 @@ static ALvoid InitContext(ALCcontext *Context)
listener.Params.mDistanceModel = Context->mDistanceModel;
- Context->AsyncEvents = ll_ringbuffer_create(511, sizeof(AsyncEvent), false);
+ Context->AsyncEvents.reset(ll_ringbuffer_create(511, sizeof(AsyncEvent), false));
StartEventThrd(Context);
}
@@ -2484,9 +2484,6 @@ ALCcontext_struct::~ALCcontext_struct()
if(count > 0)
TRACE("Destructed " SZFMT " orphaned event%s\n", count, (count==1)?"":"s");
- delete AsyncEvents;
- AsyncEvents = nullptr;
-
ALCdevice_DecRef(Device);
}