Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Utils / PolicyList_Destroyer.cpp
blob67554c18b534de468a303b428807b5cd3ea98d73
1 #include "tao/Utils/PolicyList_Destroyer.h"
3 #if !defined (__ACE_INLINE__)
4 # include "tao/Utils/PolicyList_Destroyer.inl"
5 #endif /* __ACE_INLINE__ */
7 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
9 TAO::Utils::PolicyList_Destroyer::~PolicyList_Destroyer() noexcept
11 for (CORBA::ULong i = 0; i != length(); ++i)
13 CORBA::Policy_ptr policy = (*this)[i];
14 if (!CORBA::is_nil (policy))
16 try
18 policy->destroy ();
19 (*this)[i] = CORBA::Policy::_nil();
21 catch (...)
28 TAO_END_VERSIONED_NAMESPACE_DECL