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.

This commit is contained in:
kaetemi 2012-04-09 20:18:13 +02:00
parent dee18c2e72
commit 0a07e483f9

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();
}