<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLMeshBufferAllocator/newZoneForBuffers(withSize:andType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(pl)MDLMeshBufferAllocator(im)newZoneForBuffersWithSize:andType:"
  },
  "title" : "newZoneForBuffers(withSize:andType:)"
}
-->

# newZoneForBuffers(withSize:andType:)

Creates a zone large enough to fit the specified group of allocation sizes.

```
func newZoneForBuffers(withSize sizes: [NSNumber], andType types: [NSNumber]) -> any MDLMeshBufferZone
```

## Parameters

`sizes`

An array of integers, each the length in bytes of an allocation to be made later.

`types`

An array of integers, each the [`MDLMeshBufferType`](/documentation/ModelIO/MDLMeshBufferType) value corresponding to an allocation described in the `sizes` array.

## Return Value

A new memory zone.

## Discussion

Objects implementing the [`MDLMeshBufferZone`](/documentation/ModelIO/MDLMeshBufferZone) protocol describe a logical pool of memory for allocation of related buffers. The actual class of buffer zone objects vended by an allocator may be private.

This method creates a zone with enough capacity to allocate buffers with the sizes and types specified, taking into account any alignment restrictions necessary to use these buffers.

---

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)