@@ -241,22 +241,21 @@ if (range.length > SIZE_MAX - range.location || range.location >= count || range.length > count - range.location) @throw [OFOutOfRangeException exception]; - copy = [self allocMemoryWithSize: sizeof(*copy) - count: range.length]; + copy = of_malloc(range.length, sizeof(*copy)); memcpy(copy, objects + range.location, range.length * sizeof(id)); @try { [_array removeItemsInRange: range]; _mutations++; for (size_t i = 0; i < range.length; i++) [copy[i] release]; } @finally { - [self freeMemory: copy]; + free(copy); } } - (void)removeLastObject {