@@ -369,18 +369,14 @@ [pool2 releaseObjects]; } append(ret, @selector(appendString:), [cArray[i] description]); + [ret makeImmutable]; + [pool release]; - /* - * Class swizzle the array to be immutable. We declared the return type - * to be OFArray*, so it can't be modified anyway. But not swizzling it - * would create a real copy each time -[copy] is called. - */ - ret->isa = [OFString class]; return ret; } - (BOOL)isEqual: (id)object { @@ -449,18 +445,13 @@ @throw e; } [pool release]; + [ret makeImmutable]; [ret autorelease]; - /* - * Class swizzle the array to be immutable. We declared the return type - * to be OFArray*, so it can't be modified anyway. But not swizzling it - * would create a real copy each time -[copy] is called. - */ - ret->isa = [OFString class]; return ret; } - (OFXMLElement*)XMLElementBySerializing {