--- linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.cpp 2009/02/16 17:56:50 1835 +++ linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceFactory.cpp 2009/04/26 12:19:00 1889 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005 - 2007 Christian Schoenebeck * + * Copyright (C) 2005 - 2009 Christian Schoenebeck * * * * This library is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -175,4 +175,18 @@ return InnerFactories[DriverName]->Version(); } + void AudioOutputDeviceFactory::Unregister(String DriverName) { + std::map::iterator iter = InnerFactories.find(DriverName); + if (iter != InnerFactories.end()) { + delete iter->second; + InnerFactories.erase(iter); + } + + std::map::iterator iterpf = ParameterFactories.find(DriverName); + if (iterpf != ParameterFactories.end()) { + delete iterpf->second; + ParameterFactories.erase(iterpf); + } + } + } // namespace LinuxSampler