Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void PSafeCollection::RemoveAll ( BOOL  synchronous = FALSE ) [virtual, inherited]

Remove all objects in collection.

synchronousWait till objects are deleted before returning

Definition at line 313 of file safecoll.cxx.

References PSafeCollection::DeleteObjectsToBeRemoved(), PContainer::GetSize(), PCollection::RemoveAt(), PSync::Signal(), PThread::Sleep(), and PSync::Wait().


  while (collection->GetSize() > 0)
    SafeRemoveObject(PDownCast(PSafeObject, collection->RemoveAt(0)));


  if (synchronous) {
    // Have unfortunate busy loop here, but it should be very
    // rare that it will be here for long
    while (!DeleteObjectsToBeRemoved())

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index