All objects in the collection that were created by this instance of McObjects are removed, killed (their data are freed) and Released, but they are only actually deleted if their reference count reaches zero. The usual purpose of this method is to clear all objects from the collection in preparation for releasing a CMcObjects instance when shutting down a client application.
The return value gives a count of the number of objects that were created by this instance and still have a non-zero reference count after being removed from the collection. Calling RemoveAll before Releasing your McObjects instance and testing the return value for zero (all objects were deleted) can indicate if you have properly released all pointers and object references in your application (see Remove for more discussion).
If any object is the Parent for any child McObjects, then they are also automatically removed from the collection and killed, even if they were created by another instance of McObjects.