diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-04 02:58:38 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-09-04 02:58:38 +0000 |
commit | 9381dc335de041c194d3f9c01d197d915e3b3e06 (patch) | |
tree | ceb2633f270ffa4abcb9efb66958d411a027d18d /ace/Timer_Hash_T.cpp | |
parent | 212f5d8199c40b1d3eb5b0767914fc71bf254d29 (diff) | |
download | ATCD-9381dc335de041c194d3f9c01d197d915e3b3e06.tar.gz |
ChangeLogTag:Wed Sep 3 21:38:18 1997 Carlos O'Ryan <coryan@polka.cs.wustl.edu>
Diffstat (limited to 'ace/Timer_Hash_T.cpp')
-rw-r--r-- | ace/Timer_Hash_T.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ace/Timer_Hash_T.cpp b/ace/Timer_Hash_T.cpp index 326d30bded1..bdd0241fc3d 100644 --- a/ace/Timer_Hash_T.cpp +++ b/ace/Timer_Hash_T.cpp @@ -181,7 +181,7 @@ ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, LOCK, BUCKET>::item (void) template <class TYPE, class FUNCTOR, class LOCK, class BUCKET> ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, LOCK> & ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::iter (void) { - return this->iterator_; + return *this->iterator_; } // Create an empty queue. @@ -195,8 +195,7 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::ACE_Timer_Hash_T (size_t table_si table_ (new BUCKET* [table_size]), table_size_ (table_size), table_functor_ (this), - earliest_position_ (0), - iterator_ (*this) + earliest_position_ (0) { ACE_TRACE ("ACE_Timer_Hash_T::ACE_Timer_Hash_T"); @@ -207,6 +206,8 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::ACE_Timer_Hash_T (size_t table_si this->table_[i] = new BUCKET (&this->table_functor_, this->free_list_); this->table_[i]->gettimeofday (ACE_OS::gettimeofday); } + + iterator_ = new HASH_ITERATOR(*this); } @@ -218,8 +219,7 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::ACE_Timer_Hash_T (FUNCTOR *upcall table_ (new BUCKET* [ACE_DEFAULT_TIMER_HASH_TABLE_SIZE]), table_size_ (ACE_DEFAULT_TIMER_HASH_TABLE_SIZE), table_functor_ (this), - earliest_position_ (0), - iterator_ (*this) + earliest_position_ (0) { ACE_TRACE ("ACE_Timer_Hash_T::ACE_Timer_Hash_T"); @@ -230,6 +230,8 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::ACE_Timer_Hash_T (FUNCTOR *upcall this->table_[i] = new BUCKET (&this->table_functor_, this->free_list_); this->table_[i]->gettimeofday (ACE_OS::gettimeofday); } + + iterator_ = new HASH_ITERATOR(*this); } @@ -241,6 +243,8 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::~ACE_Timer_Hash_T (void) ACE_TRACE ("ACE_Timer_Hash_T::~ACE_Timer_Hash_T"); ACE_MT (ACE_GUARD (LOCK, ace_mon, this->mutex_)); + delete iterator_; + for (size_t i = 0; i < this->table_size_; i++) delete this->table_[i]; |