Class CWaitList::
BuildAutoRelease()
Data ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: AddObjectNext page: CWaitList    Show member index
Private Function Declared in:
WaitList.h

'Declaration' icon -- Shortcut to top of page. Declaration

void BuildAutoRelease(
    unsigned long ulPosition);

'Description' icon -- Shortcut to top of page. Description

Build the auto release pointers

'Function Body' icon -- Shortcut to top of page. Function Body

//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

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.