Contents

removeObjects(fromIndices:numIndices:)

Removes the specified number of objects from the array, beginning at the specified index.

Declaration

func removeObjects(fromIndices indices: UnsafeMutablePointer<Int>, numIndices cnt: Int)

Parameters

  • indices:

    A C array of the indices of the objects to remove from the receiving array.

  • cnt:

    The number of objects to remove from the receiving array.

Discussion

This method is similar to removeObject(at:), but it allows you to efficiently remove multiple objects with a single operation. If you sort the list of indexes in ascending order, you will improve the speed of this operation.

This method cannot be sent to a remote object with distributed objects.

Special Considerations

This deprecated method uses a C array of indices. The removeObjects(at:) method uses an NSIndexSet which provides a more efficient way of indexing into an array.

See Also

Related Documentation

Removing Objects