diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-01-15 07:57:27 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-01-15 07:57:27 +0000 |
commit | 7bcf346410d13a031025bcdeb87c4bed4bc4dd5a (patch) | |
tree | 9f76a93c1df2e2eb8387f634b70d1df6aec721a6 /ACE/ace/Cleanup.h | |
parent | 903a1678de138d6dbb4711be1decb816ab86bb88 (diff) | |
download | ATCD-7bcf346410d13a031025bcdeb87c4bed4bc4dd5a.tar.gz |
Thu Jan 15 07:56:02 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Cleanup.{h,cpp}:
Added a const char* name member to ACE_Cleanup_Info_Node, this
can be passed in when registering an at_exit hook. This string can
then be used during debugging to detect problems at shutdown. It
can happen that the cleanup hook is from a dll that already is
unloaded and then we get a crash with no information, the string
at least can tell us which hook we are calling. This fixes bugzilla
3544.
* ace/Log_Msg.cpp:
* ace/Object_Manager.{h,cpp,inl}:
* ace/Object_Manager_Base.{h,cpp}:
* ace/OS_NS_stdlib.{h,inl}:
* ace/Process_Manager.cpp:
* ace/Singleton.cpp:
* ace/Token_Invariants.cpp:
* ace/Token_Manager.cpp:
Pass in the typeid of the object when registering an at_exit hook
* ace/Thread.cpp:
Moved local variable inside the loop
Diffstat (limited to 'ACE/ace/Cleanup.h')
-rw-r--r-- | ACE/ace/Cleanup.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ACE/ace/Cleanup.h b/ACE/ace/Cleanup.h index 0a158973729..642f33f2d5d 100644 --- a/ACE/ace/Cleanup.h +++ b/ACE/ace/Cleanup.h @@ -57,7 +57,7 @@ public: virtual void cleanup (void *param = 0); }; -// Adapter for cleanup, used by ACE_Object_Manager. +/// Adapter for cleanup, used by ACE_Object_Manager. extern "C" ACE_Export void ACE_CLEANUP_DESTROYER_NAME (ACE_Cleanup *, void *param = 0); @@ -74,7 +74,8 @@ public: ACE_Cleanup_Info_Node (void); ACE_Cleanup_Info_Node (void *object, ACE_CLEANUP_FUNC cleanup_hook, - void *param); + void *param, + const char *name); ~ACE_Cleanup_Info_Node (void); /// Equality operator. @@ -97,6 +98,9 @@ private: /// Parameter passed to the <cleanup_hook_>. void *param_; + + /// Name of the cleanup object + const char *name_; }; typedef ACE_Intrusive_List<ACE_Cleanup_Info_Node> ACE_Cleanup_Info_Node_List; @@ -120,7 +124,7 @@ public: ~ACE_OS_Exit_Info (void); /// Use to register a cleanup hook. - int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param); + int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param, const char* name = 0); /// Look for a registered cleanup hook object. Returns true if already /// registered, false if not. |