summaryrefslogtreecommitdiff
path: root/ace/Service_Repository.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-22 05:38:30 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-22 05:38:30 +0000
commit75ebaebcbf02241da125375973eafa202c91c774 (patch)
tree721050a8504705718f5b6e54764f550d0f5b42cc /ace/Service_Repository.cpp
parent3bfd2f03a839d07b068f01445d56d38d0aeed473 (diff)
downloadATCD-75ebaebcbf02241da125375973eafa202c91c774.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Service_Repository.cpp')
-rw-r--r--ace/Service_Repository.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
index 5fdea43218d..80e343f6faf 100644
--- a/ace/Service_Repository.cpp
+++ b/ace/Service_Repository.cpp
@@ -113,6 +113,28 @@ ACE_Service_Repository::ACE_Service_Repository (int size)
ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Service_Repository")));
}
+// Finalize (call fini() and possibly delete) all the services.
+
+int
+ACE_Service_Repository::fini (void)
+{
+ ACE_TRACE ("ACE_Service_Repository::close");
+ ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
+
+ if (this->service_vector_ != 0)
+ {
+ // Make sure to fini the services in the reverse order in which
+ // they were added.
+ for (int i = this->current_size_ - 1; i >= 0; i--)
+ {
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("finalizing %s\n"),
+ this->service_vector_[i]->name ()));
+ ((ACE_Service_Type *)this->service_vector_[i])->fini ();
+ }
+ }
+ return 0;
+}
+
// Close down all the services.
int