> > So all signals need to be saved, and disconnected when an object is 
> > destroyed?
>
> Basically yes.

The attached patch fixes the crash. Your patch may not be needed at
least for this bug.

Cheers,
Bo
Index: src/graphics/GraphicsLoader.cpp
===================================================================
--- src/graphics/GraphicsLoader.cpp	(revision 19591)
+++ src/graphics/GraphicsLoader.cpp	(working copy)
@@ -56,6 +56,8 @@
 	Image::ImagePtr image_;
 	/// This signal is emitted when the image loading status changes.
 	boost::signal<void()> signal_;
+	
+	boost::signals::connection sc_;
 
 private:
 	///
@@ -205,6 +207,7 @@
 Loader::Impl::~Impl()
 {
 	resetFile(FileName());
+	sc_.disconnect();
 }
 
 
@@ -243,7 +246,7 @@
 	if (continue_monitoring && !cached_item_->monitoring())
 		cached_item_->startMonitoring();
 
-	cached_item_->connect(boost::bind(&Impl::statusChanged, this));
+	sc_ = cached_item_->connect(boost::bind(&Impl::statusChanged, this));
 }
 
 

Reply via email to