--- linuxsampler/trunk/src/Sampler.cpp 2005/09/23 06:58:26 778 +++ linuxsampler/trunk/src/Sampler.cpp 2006/02/06 18:07:17 835 @@ -307,13 +307,12 @@ // disable device pDevice->Stop(); - // remove device from the device list - mAudioOutputDevices.erase(iter); - // destroy and free device from memory delete pDevice; } } + // remove devices from the device list + mAudioOutputDevices.clear(); } void Sampler::DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (LinuxSamplerException) { @@ -327,13 +326,12 @@ // disable device pDevice->StopListen(); - // remove device from the device list - mMidiInputDevices.erase(iter); - // destroy and free device from memory delete pDevice; } } + // remove devices from the device list + mMidiInputDevices.clear(); } MidiInputDevice* Sampler::CreateMidiInputDevice(String MidiDriver, std::map Parameters) throw (LinuxSamplerException) {