An AutoReleasePool implements simple garbage collection for reference-counted objects. It temporarily takes ownership of reference-counted objects that nobody else wants to take ownership of and releases them at a later, appropriate point in time.
AutoReleasePool<C> arp; AutoPtr<C> ptr = new C; ... arp.add(ptr.duplicate());
Creates the AutoReleasePool.
Destroys the AutoReleasePool and releases all objects it currently holds.
C * pObject
Adds the given object to the AutoReleasePool. The object's reference count is not modified