summaryrefslogtreecommitdiff
path: root/ace/config-win32.h
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-01 07:44:39 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-01 07:44:39 +0000
commitc14ded83ef83e11dbbbdbc735d5daf40ee06ea1e (patch)
tree01533dc554adafcfbcabd7075acd0356836ac0a1 /ace/config-win32.h
parenta4fd37a59a52b0fc2adede24e0806a2eb2b66ded (diff)
downloadATCD-c14ded83ef83e11dbbbdbc735d5daf40ee06ea1e.tar.gz
Fixed non-static object manger being destructed too late problem
Diffstat (limited to 'ace/config-win32.h')
-rw-r--r--ace/config-win32.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/ace/config-win32.h b/ace/config-win32.h
index 66cd0d360a2..119ba7712fb 100644
--- a/ace/config-win32.h
+++ b/ace/config-win32.h
@@ -148,6 +148,14 @@
// does not suit your need, you can disable the behavior by defining
// ACE_HAS_NONSTATIC_OBJECT_MANAGER to 0.
//
+// Defining ACE_USES_DLL_TO_MANAGE_THE_LIFECYCLE_OF_OBJECT_MANAGER =1,
+// then ACE::init/fini are called automatically for you in DllMain when
+// ACE gets linked in/unlinked automatically.
+//
+// Defining ACE_USES_DLL_TO_MANAGE_THE_LIFECYCLE_OF_OBJECT_MANAGER =1
+// automatically define ACE_HAS_NONSTATIC_OBJECT_MANAGER to 1 and define
+// ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER.
+//
// MFC users: Since the main function is defined withing MFC library,
// you'll need to instantiate the ACE_Object_Manager by doing either,
//
@@ -155,7 +163,15 @@
// 2. Instantiate Object Manager in your CApplication derived class
// and define ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER.
//
-#if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
+#if defined (ACE_HAS_DLL) && (ACE_HAS_DLL == 1) && \
+ defined (ACE_USES_DLL_TO_MANAGE_THE_LIFECYCLE_OF_OBJECT_MANAGER) && \
+ (ACE_USES_DLL_TO_MANAGE_THE_LIFECYCLE_OF_OBJECT_MANAGER == 1)
+# if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
+# undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
+# define ACE_HAS_NONSTATIC_OBJECT_MANAGER 1
+# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
+# define ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER
+#elif !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
# define ACE_HAS_NONSTATIC_OBJECT_MANAGER
#elif (ACE_HAS_NONSTATIC_OBJECT_MANAGER == 0)
# undef ACE_HAS_NONSTATIC_OBJECT_MANAGER