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.

--HG--
branch : sound_dev
This commit is contained in:
kaetemi 2012-04-09 20:18:13 +02:00
parent f858bbfbe9
commit 19546acade

View file

@ -198,7 +198,7 @@ CSoundDriverAL::~CSoundDriverAL()
{
nlwarning("AL: _Sources.size(): '%u'", (uint32)_Sources.size());
set<CSourceAL *>::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<CEffectAL *>::iterator it(_Effects.begin()), end(_Effects.end());
for (; it != end; ++it) delete *it;
for (; it != end; ++it) it->release();
_Effects.clear();
}