Index: src/OFDate.m ================================================================== --- src/OFDate.m +++ src/OFDate.m @@ -437,24 +437,28 @@ } - (instancetype)initWithDateString: (OFString *)string format: (OFString *)format { + void *pool = objc_autoreleasePoolPush(); const char *UTF8String = string.UTF8String; struct tm tm = { .tm_isdst = -1 }; int16_t tz = 0; if (of_strptime(UTF8String, format.UTF8String, &tm, &tz) != UTF8String + string.UTF8StringLength) @throw [OFInvalidFormatException exception]; + + objc_autoreleasePoolPop(pool); return [self initWithTimeIntervalSince1970: tmAndTzToTime(&tm, &tz)]; } - (instancetype)initWithLocalDateString: (OFString *)string format: (OFString *)format { + void *pool = objc_autoreleasePoolPush(); const char *UTF8String = string.UTF8String; struct tm tm = { .tm_isdst = -1 }; /* * of_strptime() can never set this to INT16_MAX, no matter what is * passed to it, so this is a safe way to figure out if the date @@ -479,10 +483,12 @@ #ifdef OF_WINDOWS } #endif } else seconds = tmAndTzToTime(&tm, &tz); + + objc_autoreleasePoolPop(pool); return [self initWithTimeIntervalSince1970: seconds]; } - (instancetype)initWithSerialization: (OFXMLElement *)element