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

# zone

Returns a zone of unscanned memory.

```
- (NSZone *) zone;
```

## Return Value

A memory zone of memory that is not scanned.

## Discussion

The collector provides a [`NSZoneMalloc`](/documentation/Foundation/NSZoneMalloc)-style allocation interface, primarily for compatibility with existing code that maintains zone affinity. Such memory is unscanned and you must free it using [`NSZoneFree`](/documentation/Foundation/NSZoneFree).  This is exactly equivalent to calling [`NSAllocateCollectable`](/documentation/Foundation/NSAllocateCollectable) with the option [`NSCollectorDisabledOption`](/documentation/Foundation/NSCollectorDisabledOption).

You should typically allocate garbage-collected memory using [`NSAllocateCollectable`](/documentation/Foundation/NSAllocateCollectable).

---

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)