Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
898 B

  1. // MemDeleteQueue.h: interface for the CMemDeleteQueue class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_MEMDELETEQUEUE_H__C8412BD8_F58D_4CB6_81F9_FAA4ABD87583__INCLUDED_)
  5. #define AFX_MEMDELETEQUEUE_H__C8412BD8_F58D_4CB6_81F9_FAA4ABD87583__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "SmartBuffer.h"
  10. #include <tchar.h>
  11. typedef CSmartBuffer<void*> DelQueue;
  12. class CMemDeleteQueue
  13. {
  14. public:
  15. void Flush();
  16. CMemDeleteQueue();
  17. virtual ~CMemDeleteQueue();
  18. void Delete(void* ptr);
  19. void DeleteArray(TCHAR* ptr);
  20. protected:
  21. void FlushDelQueue();
  22. void FlushDelArrayQueue();
  23. int m_QueueSize;
  24. DelQueue m_DelQueue;
  25. DelQueue m_DelArrayQueue;
  26. };
  27. extern CMemDeleteQueue g_DelQueue;
  28. #endif // !defined(AFX_MEMDELETEQUEUE_H__C8412BD8_F58D_4CB6_81F9_FAA4ABD87583__INCLUDED_)