@@ -18,10 +18,11 @@ */ @interface OFObject: Object { void **__memchunks; size_t __memchunks_size; + size_t __retain_count; } /** * Initialize the already allocated object. * Also sets up the memory pool for the object. @@ -28,10 +29,25 @@ * * \return An initialized object */ - init; +/** + * Increases the retain count. + */ +- retain; + +/** + * Decreases the retain cound and frees the object if it reaches 0. + */ +- release; + +/** + * Adds the object to the autorelease pool that is on top of the thread's stack. + */ +- autorelease; + /** * Adds a pointer to the memory pool. * This is useful to add memory allocated by functions such as asprintf to the * pool so it gets freed automatically when the object is freed. *