Differences From Artifact [ca9a8cdb54]:
- File
src/OFMutableSet.m
— part of check-in
[f173477bef]
at
2011-09-19 16:34:04
on branch trunk
— Rename -[allocMemoryForNItems:withSize:] and friends.
It is now -[allocMemoryForNItems:ofSize:]. (user: js, size: 3673) [annotate] [blame] [check-ins using]
To Artifact [0dd3658171]:
- File
src/OFMutableSet.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: 3693) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
82 83 84 85 86 87 88 | - (void)release { } - (void)dealloc { | | | | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - (void)release { } - (void)dealloc { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } @end @implementation OFMutableSet + (void)initialize { |
︙ | ︙ | |||
108 109 110 111 112 113 114 | } - init { if (isa == [OFMutableSet class]) { Class c = isa; [self release]; | | | | | | | | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | } - init { if (isa == [OFMutableSet class]) { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } return [super init]; } - (void)addObject: (id)object { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (void)removeObject: (id)object { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (void)minusSet: (OFSet*)set { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFEnumerator *enumerator = [set objectEnumerator]; id object; |
︙ | ︙ |