void ACE_Notification_Queue::reset() { ACE_TRACE ("ACE_Notification_Queue::reset"); // Release all the event handlers still in the queue ... for(ACE_Notification_Queue_Node * node = notify_queue_.head(); node != 0; node = node->next()) { if(node->get().eh_ == 0) { continue; } (void) node->get().eh_->remove_reference(); } // ... free up the dynamically allocated resources ... ACE_Notification_Queue_Node **b = 0; for(ACE_Unbounded_Queue_Iterator<ACE_Notification_Queue_Node *> alloc_iter (this->alloc_queue_); alloc_iter.next (b) != 0; alloc_iter.advance ()) { delete [] *b; *b = 0; } // ... cleanup the list of allocated blocks ... this->alloc_queue_.reset (); // ... swap with empty lists to reset the contents ... Buffer_List().swap(notify_queue_); Buffer_List().swap(free_queue_); }
iter* new_iter(FILE* f, char* buf, int buflen, char delim) { return init_iter(alloc_iter(),f,buf,buflen,delim); }