---
title: flushCollection
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osarray/flushcollection
---

# flushCollection

Removes and drops references to all members of array.

## Declaration

```occ
virtual void flushCollection();
```

## See Also

### Creating an Array

- [withArray](driverkit/osarray/witharray.md)
- [withCapacity](driverkit/osarray/withcapacity.md)
- [withObjects](driverkit/osarray/withobjects.md)
- [OSArrayCreate](driverkit/osarraycreate.md)
- [merge](driverkit/osarray/merge.md)
- [free](driverkit/osarray/free.md)
