Inherits from NSObject
Declared in SPPoolObject.h


The SPPoolObject class is an alternative to the base class NSObject that manages a pool of objects.

Subclasses of SPPoolObject do not deallocate object instances when the retain counter reaches zero. Instead, the objects stay in memory and will be re-used when a new instance of the object is requested. That way, object initialization is accelerated. You can release the memory of all recycled objects anytime by calling the purgePool method.

Sparrow uses this class for SPPoint, SPRectangle and SPMatrix, as they are created very often as helper objects.

To use memory pooling for another class, you just have to inherit from SPPoolObject.


Class Methods


Purge all unused objects.

+ (NSUInteger)purgePool


Purge all unused objects.

Declared In