コード例 #1
0
// This member function deletes all the Reference list entries from
// the list for which it was called.  The reference list private data member
// is updated to reflect an empty list.
void MdamRefList::deleteEntries(FixedSizeHeapManager & mdamRefListEntryHeap)
{
  MdamRefListIterator iterator(this);
  MdamRefListEntry * currentPtr = 0;
  while((currentPtr = iterator()) != 0)
    {
      mdamRefListEntryHeap.releaseElement(currentPtr);
    }
  lastEntryPtr_ = 0;
}
コード例 #2
0
// Delete all the intervals in the list.
void MdamIntervalList::deleteAllIntervals
       (FixedSizeHeapManager & mdamIntervalHeap,
        FixedSizeHeapManager & mdamRefListEntryHeap)
{
  #if defined ( NA_MDAM_EXECUTOR_DEBUG_ILTF )
  logEvent(1,-countIntervals());
  #endif /* NA_MDAM_EXECUTOR_DEBUG_ILTF */

  MdamIntervalListIterator iterator(*this);
  MdamInterval * intervalPtr = 0;
  while((intervalPtr = iterator()) != 0)
    {
      intervalPtr->release(mdamRefListEntryHeap);  // release the interval's resources
      mdamIntervalHeap.releaseElement(intervalPtr); // return interval to free list
    };
  firstIntervalPtr_ = 0;
  lastIntervalPtr_ = 0;
}