---
title: flushCollection
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15+]
path: kernel/osarray/3180810-flushcollection
---

# flushCollection

Removes and drops references to all members of array.

## Declaration

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

## See Also

### Creating an Array

- [withArray](kernel/osarray/3180823-witharray.md)
- [withCapacity](kernel/osarray/3180824-withcapacity.md)
- [withObjects](kernel/osarray/3180825-withobjects.md)
- [merge](kernel/osarray/3180819-merge.md)
- [free](kernel/osarray/3180811-free.md)
