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

# disable

Temporarily disables collections.

## Declaration

```occ
- (void) disable;
```

## Discussion

Discussion Invocations of this method can be nested. To reenable collection, you must send the collector an enable message once for each invocation of this method.

## See Also

### Collection State

- [enable](foundation/nsgarbagecollector/enable.md)
- [isEnabled](foundation/nsgarbagecollector/isenabled.md)
- [isCollecting](foundation/nsgarbagecollector/iscollecting.md)
