Differences From Artifact [489af893ca]:
- File
src/OFMutableArray_adjacent.m
— part of check-in
[f7576a66ce]
at
2012-06-06 13:47:52
on branch trunk
— Slightly change the memory management API.
Also fix a bug where OFBigDataArray would waste memory. (user: js, size: 6049) [annotate] [blame] [check-ins using] [more...]
To Artifact [fb3dbd6aee]:
- File src/OFMutableArray_adjacent.m — part of check-in [11d3d69a22] at 2012-06-10 13:28:05 on branch trunk — More API improvements. (user: js, size: 6041) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
160 161 162 163 164 165 166 | { id *objects = [array cArray], *copy; size_t i, count = [array count]; if (range.length > count - range.start) @throw [OFOutOfRangeException exceptionWithClass: isa]; | | | | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | { id *objects = [array cArray], *copy; size_t i, count = [array count]; if (range.length > count - range.start) @throw [OFOutOfRangeException exceptionWithClass: isa]; copy = [self allocMemoryWithSize: sizeof(*copy) count: range.length]; memcpy(copy, objects + range.start, range.length * sizeof(id)); @try { [array removeItemsInRange: range]; mutations++; for (i = 0; i < range.length; i++) |
︙ | ︙ |