00001 #include "tao/Utils/PolicyList_Destroyer.h" 00002 00003 #if !defined (__ACE_INLINE__) 00004 # include "tao/Utils/PolicyList_Destroyer.inl" 00005 #endif /* __ACE_INLINE__ */ 00006 00007 ACE_RCSID (Utils, 00008 PolicyList_Deactivator, 00009 "$Id: PolicyList_Destroyer.cpp 77151 2007-02-15 13:24:41Z johnnyw $") 00010 00011 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00012 00013 TAO::Utils::PolicyList_Destroyer::~PolicyList_Destroyer() throw () 00014 { 00015 00016 for (CORBA::ULong i = 0; i != length(); ++i) 00017 { 00018 CORBA::Policy_ptr policy = (*this)[i]; 00019 if (CORBA::is_nil (policy)) 00020 { 00021 continue; 00022 } 00023 00024 try 00025 { 00026 policy->destroy (); 00027 } 00028 catch (...) 00029 { 00030 } 00031 00032 (*this)[i] = CORBA::Policy::_nil(); 00033 } 00034 } 00035 00036 TAO_END_VERSIONED_NAMESPACE_DECL