Differences From Artifact [d472eede07]:
- File
src/OFArray_adjacent.m
— part of check-in
[e1e7ffa903]
at
2011-09-22 23:25:42
on branch trunk
— Exceptions are now autoreleased.
This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. (user: js, size: 6562) [annotate] [blame] [check-ins using]
To Artifact [76943c273b]:
- File src/OFArray_adjacent.m — part of check-in [03f14bf019] at 2011-10-04 13:14:16 on branch trunk — Split OFXMLElement into OFXML{Element,Characters,CDATA,Comment}. (user: js, size: 6516) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
189 190 191 192 193 194 195 | if ((![[element name] isEqual: @"OFArray"] && ![[element name] isEqual: @"OFMutableArray"]) || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exceptionWithClass: isa selector: _cmd]; | | > < < < < < | | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | if ((![[element name] isEqual: @"OFArray"] && ![[element name] isEqual: @"OFMutableArray"]) || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exceptionWithClass: isa selector: _cmd]; enumerator = [[element elementsForNamespace: OF_SERIALIZATION_NS] objectEnumerator]; pool2 = [[OFAutoreleasePool alloc] init]; while ((child = [enumerator nextObject]) != nil) { id object = [child objectByDeserializing]; [array addItem: &object]; [object retain]; [pool2 releaseObjects]; } [pool release]; |
︙ | ︙ |