// MemDeleteQueue.cpp: implementation of the CMemDeleteQueue class. // ////////////////////////////////////////////////////////////////////// #include "MemDeleteQueue.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CMemDeleteQueue::CMemDeleteQueue() : m_DelQueue(10010), m_DelArrayQueue(100010), m_QueueSize(100000) { } CMemDeleteQueue::~CMemDeleteQueue() { Flush(); } void CMemDeleteQueue::Delete(void *ptr) { // delete ptr; m_DelQueue.AddElement(ptr); if (m_DelQueue.GetNumElementsStored() >= m_QueueSize) { FlushDelQueue(); } } void CMemDeleteQueue::FlushDelQueue() { for (int i=0; i= m_QueueSize) { FlushDelArrayQueue(); } } void CMemDeleteQueue::FlushDelArrayQueue() { for (int i=0; i