---
title: collectExhaustively
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsgarbagecollector/collectexhaustively
---

# collectExhaustively

Tells the receiver to collect iteratively.

## Declaration

```occ
- (void) collectExhaustively;
```

## Discussion

Discussion You use this method to indicate to the collector that it should perform an exhaustive collection. Collection is subject to interruption on user input.

## See Also

### Triggering Collection

- [collectIfNeeded](foundation/nsgarbagecollector/collectifneeded.md)
