|
From: <br...@us...> - 2009-02-27 07:56:28
|
Revision: 3814
http://openvrml.svn.sourceforge.net/openvrml/?rev=3814&view=rev
Author: braden
Date: 2009-02-27 07:56:25 +0000 (Fri, 27 Feb 2009)
Log Message:
-----------
Clear the maps before unloading the modules so that we don't reference code that's just been unloaded.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/script.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-12-10 09:46:49 UTC (rev 3813)
+++ trunk/ChangeLog 2009-02-27 07:56:25 UTC (rev 3814)
@@ -1,3 +1,10 @@
+2009-02-27 Braden McDaniel <br...@en...>
+
+ * src/libopenvrml/openvrml/script.cpp
+ (openvrml::script_factory_registry::impl::~impl()): Clear the maps
+ before unloading the modules so that we don't reference code
+ that's just been unloaded.
+
2008-12-10 Braden McDaniel <br...@en...>
* src/Makefile.am: Build libraries with -no-undefined.
Modified: trunk/src/libopenvrml/openvrml/script.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/script.cpp 2008-12-10 09:46:49 UTC (rev 3813)
+++ trunk/src/libopenvrml/openvrml/script.cpp 2009-02-27 07:56:25 UTC (rev 3814)
@@ -471,6 +471,14 @@
openvrml::script_factory_registry::impl::~impl() OPENVRML_NOTHROW
{
using namespace openvrml::local;
+
+ //
+ // Clear the maps before unloading the modules so that we don't reference
+ // code that's just been unloaded.
+ //
+ this->uri_scheme_map_.clear();
+ this->media_type_map_.clear();
+
std::for_each(this->module_handles_.begin(), this->module_handles_.end(),
dl::close);
dl::exit(); // Don't care if this fails. What would we do?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|