Iterating among the available heaps

To get a list of heaps currently available to your task, call GetMemoryHeaps(), a static member function of TMemoryHeap:

      TSetOf<TMemoryHeap> theHeaps;
      TMemoryHeap::GetMemoryHeaps(theHeaps);
The collection passed as an argument can be any subclass of TCollectionOf<TMemoryHeap>. To iterate among the heaps in the collection, simply declare an appropriate iterator:

      TSetOfIterator<TMemoryHeap> iterator(theHeaps);
      TMemoryHeap* heap = (TMemoryHeap*)iterator.First();


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker