Library: Foundation
Package: Core
Header: Poco/AutoReleasePool.h
An AutoReleasePool implements simple garbage collection for reference-counted objects. It temporarily takes ownwership of reference-counted objects that nobody else wants to take ownership of and releases them at a later, appropriate point in time.
Note: The correct way to add an object hold by an AutoPtr<> to an AutoReleasePool is by invoking the AutoPtr's duplicate() method. Example:
AutoReleasePool<C> arp; AutoPtr<C> ptr = new C; ... arp.add(ptr.duplicate());
Member Functions: add, release
 
 Creates the AutoReleasePool.
 
 ~AutoReleasePool();
Destroys the AutoReleasePool and releases all objects it currently holds.
 
 void add(
    C * pObject
);
Adds the given object to the AutoReleasePool. The object's reference count is not modified
 
 void release();
Releases all objects the AutoReleasePool currently holds by calling each object's release() method.