From ee4eb695119bce96515b330f9fc83ddd67da5c62 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Dec 2009 12:26:05 +0200 Subject: Implement de-registering polymorphic type information This is required for DLL/shared library unloading. --- libxsd/xsd/cxx/tree/comparison-map.txx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libxsd/xsd/cxx/tree/comparison-map.txx') 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 + void comparison_map:: + unregister_type (const type_id& tid) + { + type_map_.erase (&tid); + } + + template bool comparison_map:: compare (const type& x, const type& y) { @@ -282,6 +289,13 @@ namespace xsd comparison_map_instance ().register_type ( typeid (T), &comparator_impl); } + + template + comparison_initializer:: + ~comparison_initializer () + { + comparison_map_instance ().unregister_type (typeid (T)); + } } } } -- cgit v1.1