CDelayedDelete Class Reference#include <DelayedDelete.h>
Collaboration diagram for CDelayedDelete:
![]()
Detailed DescriptionDefinition at line 53 of file DelayedDelete.h. Member Typedef Documentation
Definition at line 58 of file DelayedDelete.h.
Constructor & Destructor Documentation
Definition at line 51 of file DelayedDelete.cpp. 00052 { 00053 //Create the CS 00054 m_pCS=COSManager::CreateCriticalSection(); 00055 00056 //Create the thread 00057 m_pThread=new CPeriodicThread(DeleteThreadProc); 00058 m_pThread->Start(1000, 00059 (LPVOID)this); 00060 }
Definition at line 62 of file DelayedDelete.cpp. 00063 { 00064 //Close the thread 00065 delete m_pThread; 00066 00067 //Delete all the remaining items 00068 DeleteAll(); 00069 00070 //Delete the CS 00071 delete m_pCS; 00072 }
Member Function Documentation
Definition at line 145 of file DelayedDelete.cpp. 00148 { 00149 //Sanity check 00150 if (!lpItem || 00151 !pProc) 00152 return; 00153 00154 //Put in the struct 00155 DeleteStructure aData; 00156 aData.pProc=pProc; 00157 aData.lpItemToDelete=lpItem; 00158 00159 //Some locking 00160 CCriticalAutoRelease aRelease(m_pCS); 00161 00162 //Now set time 00163 aData.dwExpireTime=GetTickCount()+dwDeleteTimeout; 00164 00165 //Add to the list 00166 m_aData.insert(m_aData.begin(), 00167 aData); 00168 }
The documentation for this class was generated from the following files: |