Differences From Artifact [d91bdef886]:
- File src/OFNull.m — part of check-in [798d9e6320] at 2011-09-09 13:35:16 on branch trunk — [pool release] can never throw by convention now. (user: js, size: 1951) [annotate] [blame] [check-ins using]
To Artifact [6eac9873fd]:
- File
src/OFNull.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: 1961) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
43 44 45 46 47 48 49 | [self release]; pool = [[OFAutoreleasePool alloc] init]; if (![[element name] isEqual: [self className]] || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) | | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | [self release]; pool = [[OFAutoreleasePool alloc] init]; if (![[element name] isEqual: [self className]] || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exceptionWithClass: isa selector: _cmd]; [pool release]; return [OFNull null]; } - (OFString*)description |
︙ | ︙ | |||
97 98 99 100 101 102 103 | - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } - (void)dealloc { | | | | 97 98 99 100 101 102 103 104 105 106 107 108 | - (unsigned int)retainCount { return OF_RETAIN_COUNT_MAX; } - (void)dealloc { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } @end |