Differences From Artifact [b8f5cd2bb5]:
- File
src/OFMutableArray_adjacent.m
— part of check-in
[1255f3a11a]
at
2012-08-10 20:08:24
on branch trunk
— Directly use the runtime's autorelease pools.
This greatly improves performance, as it gets rid of the overhead of
OFAutoreleasePool. (user: js, size: 6392) [annotate] [blame] [check-ins using]
To Artifact [35095fc2a7]:
- File src/OFMutableArray_adjacent.m — part of check-in [c9433ea60d] at 2012-10-14 00:54:58 on branch trunk — range.start -> range.location. (user: js, size: 6398) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
172 173 174 175 176 177 178 |
}
- (void)removeObjectsInRange: (of_range_t)range
{
id *objects = [array cArray], *copy;
size_t i, count = [array count];
| | | | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
}
- (void)removeObjectsInRange: (of_range_t)range
{
id *objects = [array cArray], *copy;
size_t i, count = [array count];
if (range.length > count - range.location)
@throw [OFOutOfRangeException exceptionWithClass: [self class]];
copy = [self allocMemoryWithSize: sizeof(*copy)
count: range.length];
memcpy(copy, objects + range.location, range.length * sizeof(id));
@try {
[array removeItemsInRange: range];
mutations++;
for (i = 0; i < range.length; i++)
[copy[i] release];
|
| ︙ | ︙ |