gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-324-gbf1b834
Date: Fri, 29 Apr 2011 09:38:12 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  bf1b83496da3cb98b111f8875334876baa91dc3e (commit)
      from  081407de71c4f8c345ffe1a67d0560ab2223bada (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=bf1b83496da3cb98b111f8875334876baa91dc3e


commit bf1b83496da3cb98b111f8875334876baa91dc3e
Author: Sandro Santilli <address@hidden>
Date:   Fri Apr 29 10:28:10 2011 +0200

    Fix leak on sound_handler destructor (only exposed when using 
NullSoundHandler, that is test runners...)

diff --git a/libsound/sdl/sound_handler_sdl.cpp 
b/libsound/sdl/sound_handler_sdl.cpp
index 0574062..f3fa12a 100644
--- a/libsound/sdl/sound_handler_sdl.cpp
+++ b/libsound/sdl/sound_handler_sdl.cpp
@@ -122,19 +122,13 @@ SDL_sound_handler::reset()
 SDL_sound_handler::~SDL_sound_handler()
 {
     boost::mutex::scoped_lock lock(_mutex);
+
 #ifdef GNASH_DEBUG_SDL_AUDIO_PAUSING
     log_debug("Pausing SDL Audio on destruction");
 #endif
     SDL_PauseAudio(1);
 
-    lock.unlock();
-
-    // we already locked, so we call 
-    // the base class (non-locking) deleter
-    delete_all_sounds();
-
-    unplugAllInputStreams();
-
+    // this one takes 2 seconds on my machine ...
     SDL_CloseAudio();
 
 }
diff --git a/libsound/sound_handler.cpp b/libsound/sound_handler.cpp
index aaee72f..4528d2a 100644
--- a/libsound/sound_handler.cpp
+++ b/libsound/sound_handler.cpp
@@ -740,5 +740,11 @@ sound_handler::attach_aux_streamer(aux_streamer_ptr ptr, 
void* owner)
     return ret;
 }
 
+sound_handler::~sound_handler()
+{
+    delete_all_sounds();
+    unplugAllInputStreams();
+}
+
 } // gnash.sound namespace 
 } // namespace gnash
diff --git a/libsound/sound_handler.h b/libsound/sound_handler.h
index 8c54d3e..c306068 100644
--- a/libsound/sound_handler.h
+++ b/libsound/sound_handler.h
@@ -347,7 +347,7 @@ public:
     ///
     virtual void unplugInputStream(InputStream* id);
 
-    virtual ~sound_handler() {};
+    virtual ~sound_handler();
     
     /// \brief
     /// Gets the duration in milliseconds of an event sound connected

-----------------------------------------------------------------------

Summary of changes:
 libsound/sdl/sound_handler_sdl.cpp |   10 ++--------
 libsound/sound_handler.cpp         |    6 ++++++
 libsound/sound_handler.h           |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]