Differences From Artifact [6b04031efb]:
- File src/exceptions/OFMutexUnlockFailedException.m — part of check-in [74eeea199c] at 2011-09-11 00:03:44 on branch trunk — Make use of the fact that -[retain] and -[release] must not throw. (user: js, size: 1467) [annotate] [blame] [check-ins using]
To Artifact [3270e6620d]:
- File
src/exceptions/OFMutexUnlockFailedException.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: 1499) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 | #import "OFMutexUnlockFailedException.h" #import "OFString.h" #import "OFThread.h" #import "OFNotImplementedException.h" @implementation OFMutexUnlockFailedException | | | | | | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #import "OFMutexUnlockFailedException.h" #import "OFString.h" #import "OFThread.h" #import "OFNotImplementedException.h" @implementation OFMutexUnlockFailedException + exceptionWithClass: (Class)class_ mutex: (OFMutex*)mutex { return [[[self alloc] initWithClass: class_ mutex: mutex] autorelease]; } - initWithClass: (Class)class_ { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } - initWithClass: (Class)class_ mutex: (OFMutex*)mutex_ { self = [super initWithClass: class_]; |
︙ | ︙ |