From: frohlich Date: Wed, 11 Mar 2009 05:34:02 +0000 (+0000) Subject: Use a reference counted pointer for the condition. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=deef158822d9ad81a1c87a42da74963587a6a859;p=simgear.git Use a reference counted pointer for the condition. Modified Files: simgear/sound/xmlsound.hxx simgear/sound/xmlsound.cxx --- diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 18850f84..47438603 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -63,7 +63,6 @@ static const struct { SGXmlSound::SGXmlSound() : _sample(NULL), - _condition(NULL), _active(false), _name(""), _mode(SGXmlSound::ONCE), @@ -80,8 +79,6 @@ SGXmlSound::~SGXmlSound() if (_sample) _sample->stop(); - delete _condition; - _volume.clear(); _pitch.clear(); } diff --git a/simgear/sound/xmlsound.hxx b/simgear/sound/xmlsound.hxx index 66caa139..d161bbca 100644 --- a/simgear/sound/xmlsound.hxx +++ b/simgear/sound/xmlsound.hxx @@ -138,7 +138,7 @@ private: SGSoundMgr * _mgr; SGSharedPtr _sample; - SGCondition * _condition; + SGSharedPtr _condition; SGPropertyNode_ptr _property; bool _active;