00001 // -*- C++ -*- 00002 // 00003 // $Id: Intrusive_Ref_Count_Base_T.inl 69150 2005-11-02 07:13:04Z ossama $ 00004 00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 template <typename T> 00008 ACE_INLINE 00009 TAO_Intrusive_Ref_Count_Base<T>::TAO_Intrusive_Ref_Count_Base (void) 00010 : ref_count_(1) 00011 {} 00012 00013 00014 template <typename T> 00015 ACE_INLINE 00016 void 00017 TAO_Intrusive_Ref_Count_Base<T>::_add_ref (void) 00018 { 00019 ++this->ref_count_; 00020 } 00021 00022 00023 template <typename T> 00024 ACE_INLINE 00025 void 00026 TAO_Intrusive_Ref_Count_Base<T>::_remove_ref (void) 00027 { 00028 long const new_count = --this->ref_count_; 00029 00030 if (new_count != 0) 00031 { 00032 return; 00033 } 00034 00035 delete this; 00036 } 00037 00038 TAO_END_VERSIONED_NAMESPACE_DECL