<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.5.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSGarbageCollector/enable",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSGarbageCollector(im)enable"
  },
  "title" : "enable"
}
-->

# enable

Enables collection after collection has been disabled.

```
- (void) enable;
```

## Discussion

This method balances a single invocation of [`disable`](/documentation/Foundation/NSGarbageCollector/disable). To reenable collection, this method must be invoked as many times as was [`disable`](/documentation/Foundation/NSGarbageCollector/disable).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)