(file) Return to Memory.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Memory.h between version 1.22 and 1.23

version 1.22, 2006/01/30 16:17:05 version 1.23, 2006/07/12 21:10:58
Line 72 
Line 72 
 template<class T> template<class T>
 inline void Destroy(T* items, Uint32 size) inline void Destroy(T* items, Uint32 size)
 { {
   #ifdef PEGASUS_OS_HPUX
       // Empirical evidence shows that the memory allocator on HP-UX performs
       // better when deallocating more recently allocated memory first (LIFO).
       // Since most arrays are built up by appending elements to the end, it is
       // advantageous to destruct the elements in reverse order.
       items += size-1;
       while (size--)
           (items--)->~T();
   #else
     while (size--)     while (size--)
         items++->~T();         items++->~T();
   #endif
 } }
  
 template<class T> template<class T>


Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2