From 0a07e483f9bd555e926ee4f51a5b8ff63b185227 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 9 Apr 2012 20:18:13 +0200 Subject: [PATCH] Reverted: a1603fc4efbf Only release internal resources in driver destructor, not the driver classes, otherwise there will be crashes on exit. The driver classes are deleted by the application. --- code/nel/src/sound/driver/openal/sound_driver_al.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/sound/driver/openal/sound_driver_al.cpp b/code/nel/src/sound/driver/openal/sound_driver_al.cpp index e94755c63..6844514c3 100644 --- a/code/nel/src/sound/driver/openal/sound_driver_al.cpp +++ b/code/nel/src/sound/driver/openal/sound_driver_al.cpp @@ -198,7 +198,7 @@ CSoundDriverAL::~CSoundDriverAL() { nlwarning("AL: _Sources.size(): '%u'", (uint32)_Sources.size()); set::iterator it(_Sources.begin()), end(_Sources.end()); - for (; it != end; ++it) delete *it; + for (; it != end; ++it) it->release(); _Sources.clear(); } if (!_Buffers.empty()) alDeleteBuffers(compactAliveNames(_Buffers, alIsBuffer), &*_Buffers.begin()); @@ -207,7 +207,7 @@ CSoundDriverAL::~CSoundDriverAL() { nlwarning("AL: _Effects.size(): '%u'", (uint32)_Effects.size()); set::iterator it(_Effects.begin()), end(_Effects.end()); - for (; it != end; ++it) delete *it; + for (; it != end; ++it) it->release(); _Effects.clear(); }