@@ -25,13 +25,13 @@ #include #include #import "OFString.h" -#import "OFAutoreleasePool.h" + #import "asprintf.h" - +#import "autorelease.h" #import "macros.h" #define MAX_SUBFORMAT_LEN 64 struct context { @@ -287,16 +287,16 @@ @try { id object; if ((object = va_arg(ctx->arguments, id)) != nil) { - OFAutoreleasePool *pool; + void *pool = objc_autoreleasePoolPush(); - pool = [[OFAutoreleasePool alloc] init]; tmpLen = asprintf(&tmp, ctx->subformat, [[object description] UTF8String]); - [pool release]; + + objc_autoreleasePoolPop(pool); } else tmpLen = asprintf(&tmp, ctx->subformat, "(nil)"); } @catch (id e) { free(ctx->buffer);