Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -242,14 +242,20 @@ * pool for the object. * * This method will never return nil, instead, it will throw an * OFAllocFailedException. * - * \return The allocated object. + * \return The allocated object */ + alloc; +/** + * \brief Allocates memory for a new instance and calls -[init] on it. + * \return An allocated and initialized object + */ ++ new; + /** * \brief Returns the class. * * \return The class */ Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -217,10 +217,15 @@ break; } return instance; } + ++ new +{ + return [[self alloc] init]; +} + (Class)class { return self; }