summaryrefslogtreecommitdiff
path: root/ace/Service_Object.cpp
diff options
context:
space:
mode:
authorjohn_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-04-28 03:50:28 +0000
committerjohn_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-04-28 03:50:28 +0000
commit88556d568eb0a06bf8af2ddefacbc1ad5f00401e (patch)
tree72f4a0e33b9dd26d1783ff005d67494bfb79a9de /ace/Service_Object.cpp
parent317d8c1ce78436f0107f056418c0c5f5b4231069 (diff)
downloadATCD-oci_dave_wchar_refactor_branch.tar.gz
4_27_06 branch merge in and compile error fixedoci_dave_wchar_refactor_branch
Diffstat (limited to 'ace/Service_Object.cpp')
-rw-r--r--ace/Service_Object.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp
index 00de5f6e056..87d5b655151 100644
--- a/ace/Service_Object.cpp
+++ b/ace/Service_Object.cpp
@@ -26,6 +26,18 @@ ACE_Service_Type::dump (void) const
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Service_Type::dump");
#endif /* ACE_HAS_DUMP */
+
+
+ // Using printf, since the log facility may not have
+ // been initialized yet
+ ACE_OS::fprintf(stderr,
+ "// [ST] dump, this=%p, name=%s, type=%p, so=%p, active=%d\n",
+ this,
+ this->name_,
+ this->type_,
+ (this->type_ != 0) ? this->type_->object () : 0,
+ this->active_);
+
}
ACE_Service_Type::ACE_Service_Type (const ACE_TCHAR *n,
@@ -60,7 +72,6 @@ ACE_Service_Type::ACE_Service_Type (const ACE_TCHAR *n,
ACE_Service_Type::~ACE_Service_Type (void)
{
ACE_TRACE ("ACE_Service_Type::~ACE_Service_Type");
-
this->fini ();
delete [] const_cast <ACE_TCHAR *> (this->name_);
@@ -72,7 +83,15 @@ ACE_Service_Type::fini (void)
if (!this->fini_already_called_)
{
this->fini_already_called_ = 1;
+ if (this->type_ != 0)
return this->type_->fini ();
+ else
+ return 1; // No implementation was found.
+ // Currently only makes sense for dummy ST, used to "reserve"
+ // a spot (kind of like forward-declarations) for a dynamic
+ // service. This is necessary to help enforce the correct
+ // finalization order, when such service also has any
+ // (dependent) static services
}
return 0;
}