id summary reporter owner description type status milestone component version severity resolution keywords cc 9553 destruction of flyweights fails from a module which never creates flyweigths Axel Habermann Joaquín M López Muñoz "Using a factory pattern together with shared_ptr, all flyweight instances are created in one dll only. Due to shared ownership, they might be destroyed from a dll which never creates a single flyweight. Because erase does not call core::init(), the module global state for flyweight management is never initialized, even when using intermodule_holder, leading to a crash when accessed. It is not possible to provide a minimal example, because the example must consist of different modules. The following patch fixes the problem: {{{ Index: flyweight/detail/flyweight_core.hpp =================================================================== --- flyweight/detail/flyweight_core.hpp (revision 462875) +++ flyweight/detail/flyweight_core.hpp (revision 462876) @@ -65,6 +65,7 @@ template static void erase(const handle_type& h,Checker chk) { + core::init(); typedef typename core::lock_type lock_type; lock_type lock(core::mutex()); if(chk(h))core::factory().erase(h); }}} " Bugs closed To Be Determined flyweight Boost 1.55.0 Showstopper fixed si@… mue@…