summaryrefslogtreecommitdiff
path: root/TAO/tao/Utils/PolicyList_Destroyer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Utils/PolicyList_Destroyer.cpp')
-rw-r--r--TAO/tao/Utils/PolicyList_Destroyer.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/TAO/tao/Utils/PolicyList_Destroyer.cpp b/TAO/tao/Utils/PolicyList_Destroyer.cpp
index 5e15e55e325..adc8436e240 100644
--- a/TAO/tao/Utils/PolicyList_Destroyer.cpp
+++ b/TAO/tao/Utils/PolicyList_Destroyer.cpp
@@ -10,20 +10,24 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO::Utils::PolicyList_Destroyer::~PolicyList_Destroyer() throw ()
{
+
for (CORBA::ULong i = 0; i != length(); ++i)
{
CORBA::Policy_ptr policy = (*this)[i];
- if (!CORBA::is_nil (policy))
+ if (CORBA::is_nil (policy))
+ {
+ continue;
+ }
+
+ try
{
- try
- {
- policy->destroy ();
- (*this)[i] = CORBA::Policy::_nil();
- }
- catch (...)
- {
- }
+ policy->destroy ();
}
+ catch (...)
+ {
+ }
+
+ (*this)[i] = CORBA::Policy::_nil();
}
}