![]() |
BuildAutoRelease() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: WaitList.h |
void BuildAutoRelease( unsigned long ulPosition);
Build the auto release pointers
//Release the pointer first Release(); //How many items unsigned long ulItems; if (ulPosition) //Check if we can use this for the auto release if (m_bRelease[ulPosition-1]) ulItems=1; else //Exit return; else ulItems=m_ulWaitCount; //Build the list m_ppRelease=new CWaitableObjectAutoRelease*[ulItems+1]; memset(m_ppRelease, 0, sizeof(CWaitableObjectAutoRelease*)*(ulItems+1)); //Populate it if (ulPosition) m_ppRelease[0]=new CWaitableObjectAutoRelease(m_aObjects[ulPosition-1]); else { unsigned long ulRunningCounter; ulRunningCounter=0; //And build it for (unsigned long ulCounter=0; ulCounter<m_ulWaitCount; ++ulCounter) //Can we auto release it if (m_bRelease[ulCounter]) //Add it m_ppRelease[ulRunningCounter++]=new CWaitableObjectAutoRelease(m_aObjects[ulCounter]); } //Done
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |