163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
for (i = 0; i < nObjects; i++)
[copy[i] release];
} @finally {
[self freeMemory: copy];
}
}
- (void)removeObjectsInRange: (of_range_t)range
{
id *cArray = [array cArray], *copy;
size_t i, count = [array count];
if (range.length > count - range.start)
|
>
>
>
>
>
>
>
>
>
>
>
|
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
for (i = 0; i < nObjects; i++)
[copy[i] release];
} @finally {
[self freeMemory: copy];
}
}
- (void)removeAllObjects
{
id *cArray = [array cArray];
size_t i, count = [array count];
for (i = 0; i < count; i++)
[cArray[i] release];
[array removeAllItems];
}
- (void)removeObjectsInRange: (of_range_t)range
{
id *cArray = [array cArray], *copy;
size_t i, count = [array count];
if (range.length > count - range.start)
|