diff options
author | jeliazkov_i <jeliazkov_i@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-04-26 21:21:54 +0000 |
---|---|---|
committer | jeliazkov_i <jeliazkov_i@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-04-26 21:21:54 +0000 |
commit | 1eb32850ac74670c4baf84f7113119e596016e60 (patch) | |
tree | a9b9968661496861e290f57b51d11264f75c299f /ace/Service_Object.cpp | |
parent | b9a9a05f27a7afd4b57329b9409385f9bff0a754 (diff) | |
download | ATCD-1eb32850ac74670c4baf84f7113119e596016e60.tar.gz |
ChangeLogTag: Wed Apr 26 20:21:49 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com>
Diffstat (limited to 'ace/Service_Object.cpp')
-rw-r--r-- | ace/Service_Object.cpp | 21 |
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; } |