diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-12-02 12:26:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-12-02 12:26:05 +0200 |
commit | ee4eb695119bce96515b330f9fc83ddd67da5c62 (patch) | |
tree | 817bf37d4b0f0fb89e785004c41b4c6928228f79 /libxsd/xsd/cxx/tree/comparison-map.txx | |
parent | c155e6925211747af9a13a5994c2f768c5048971 (diff) |
Implement de-registering polymorphic type information
This is required for DLL/shared library unloading.
Diffstat (limited to 'libxsd/xsd/cxx/tree/comparison-map.txx')
-rw-r--r-- | libxsd/xsd/cxx/tree/comparison-map.txx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libxsd/xsd/cxx/tree/comparison-map.txx b/libxsd/xsd/cxx/tree/comparison-map.txx index 38f215f..3af2a42 100644 --- a/libxsd/xsd/cxx/tree/comparison-map.txx +++ b/libxsd/xsd/cxx/tree/comparison-map.txx @@ -219,6 +219,13 @@ namespace xsd } template <typename C> + void comparison_map<C>:: + unregister_type (const type_id& tid) + { + type_map_.erase (&tid); + } + + template <typename C> bool comparison_map<C>:: compare (const type& x, const type& y) { @@ -282,6 +289,13 @@ namespace xsd comparison_map_instance<id, C> ().register_type ( typeid (T), &comparator_impl<T>); } + + template<unsigned long id, typename C, typename T> + comparison_initializer<id, C, T>:: + ~comparison_initializer () + { + comparison_map_instance<id, C> ().unregister_type (typeid (T)); + } } } } |