From 95ccfd806cd5f5859d09503f60a85987eb8bb1af Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 22 Feb 2010 14:29:37 +0000 Subject: Do some decent cleanup in LinuxVolumeCatcherImpl's destructor. Though I don't think media plugins are really 'destroyed' as we know it, their process just ends. --- indra/media_plugins/webkit/linux_volume_catcher.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp index cfb78d2036..cc5a456c96 100644 --- a/indra/media_plugins/webkit/linux_volume_catcher.cpp +++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp @@ -148,9 +148,20 @@ void LinuxVolumeCatcherImpl::init() void LinuxVolumeCatcherImpl::cleanup() { - // there's some cleanup we could do, but do nothing... for now. - mConnected = false; + + if (mPAContext) + { + pa_context_disconnect(mPAContext); + pa_context_unref(mPAContext); + mPAContext = NULL; + } + + if (mMainloop) + { + pa_glib_mainloop_free(mMainloop); + mMainloop = NULL; + } } void LinuxVolumeCatcherImpl::setVolume(F32 volume) -- cgit v1.2.3