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:
parent
2c07386ccf
commit
4512fb0a15
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ CSoundDriverAL::~CSoundDriverAL()
|
||||||
{
|
{
|
||||||
nlwarning("AL: _Sources.size(): '%u'", (uint32)_Sources.size());
|
nlwarning("AL: _Sources.size(): '%u'", (uint32)_Sources.size());
|
||||||
set<CSourceAL *>::iterator it(_Sources.begin()), end(_Sources.end());
|
set<CSourceAL *>::iterator it(_Sources.begin()), end(_Sources.end());
|
||||||
for (; it != end; ++it) delete *it;
|
for (; it != end; ++it) it->release();
|
||||||
_Sources.clear();
|
_Sources.clear();
|
||||||
}
|
}
|
||||||
if (!_Buffers.empty()) alDeleteBuffers(compactAliveNames(_Buffers, alIsBuffer), &*_Buffers.begin());
|
if (!_Buffers.empty()) alDeleteBuffers(compactAliveNames(_Buffers, alIsBuffer), &*_Buffers.begin());
|
||||||
|
@ -207,7 +207,7 @@ CSoundDriverAL::~CSoundDriverAL()
|
||||||
{
|
{
|
||||||
nlwarning("AL: _Effects.size(): '%u'", (uint32)_Effects.size());
|
nlwarning("AL: _Effects.size(): '%u'", (uint32)_Effects.size());
|
||||||
set<CEffectAL *>::iterator it(_Effects.begin()), end(_Effects.end());
|
set<CEffectAL *>::iterator it(_Effects.begin()), end(_Effects.end());
|
||||||
for (; it != end; ++it) delete *it;
|
for (; it != end; ++it) it->release();
|
||||||
_Effects.clear();
|
_Effects.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue