summaryrefslogtreecommitdiff
path: root/devel/ice/files/patch-cpp-include-Ice-FactoryTableInit.h
blob: e3211f25aa2fe1fd10259a9c626a1ac060af7043 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--- cpp/include/Ice/FactoryTableInit.h.orig	2015-06-23 15:30:20.000000000 +0000
+++ cpp/include/Ice/FactoryTableInit.h	2015-06-27 14:51:48.188288621 +0000
@@ -48,6 +55,9 @@
     
     DefaultUserExceptionFactoryInit(const char* typeId) :
         _typeId(typeId)
+#if defined(ICE_BROKEN_ATEXIT)
+        , _ftableInit(new IceInternal::FactoryTableInit)
+#endif
     {
         factoryTable->addExceptionFactory(_typeId, new DefaultUserExceptionFactory<E>(_typeId));
     }
@@ -55,10 +65,16 @@
     ~DefaultUserExceptionFactoryInit()
     {
         factoryTable->removeExceptionFactory(_typeId);
+#if defined(ICE_BROKEN_ATEXIT)
+        delete _ftableInit;
+#endif
     }
     
 private:
     const ::std::string _typeId;
+#if defined(ICE_BROKEN_ATEXIT)
+    IceInternal::FactoryTableInit* _ftableInit;
+#endif
 };
 
 template<class O>
@@ -67,7 +83,10 @@
 public:
     
     DefaultObjectFactoryInit(const char* typeId) :
-        _typeId(typeId)
+        _typeId(typeId)
+#if defined(ICE_BROKEN_ATEXIT)
+        , _ftableInit(new IceInternal::FactoryTableInit)
+#endif
     {
         factoryTable->addObjectFactory(_typeId, new DefaultObjectFactory<O>(_typeId));
     }
@@ -75,11 +94,16 @@
     ~DefaultObjectFactoryInit()
     {
         factoryTable->removeObjectFactory(_typeId);
+#if defined(ICE_BROKEN_ATEXIT)
+        delete _ftableInit;
+#endif
     }
     
 private:
     const ::std::string _typeId;
- 
+#if defined(ICE_BROKEN_ATEXIT)
+    IceInternal::FactoryTableInit* _ftableInit;
+#endif
 };
 
 }