summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 1d4b14f67ad..734823cdc06 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -1664,8 +1664,15 @@ IceInternal::Instance::destroy()
}
#endif
+#ifdef ICE_CPP11_COMPILER
+ for(const auto& p : _objectFactoryMap)
+ {
+ p.second->destroy();
+ }
+#else
for_each(_objectFactoryMap.begin(), _objectFactoryMap.end(),
Ice::secondVoidMemFun<const string, ObjectFactory>(&ObjectFactory::destroy));
+#endif
_objectFactoryMap.clear();
if(_routerManager)