---
title: "newZoneForBuffers(withSize:andType:)"
framework: modelio
role: symbol
role_heading: Instance Method
path: "modelio/mdlmeshbufferallocator/newzoneforbuffers(withsize:andtype:)"
---

# newZoneForBuffers(withSize:andType:)

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

## Declaration

```swift
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 doc://com.apple.modelio/documentation/ModelIO/MDLMeshBufferType value corresponding to an allocation described in the sizes array.

## Return Value

Return Value A new memory zone.

## Discussion

Discussion Objects implementing the 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.

## See Also

### Allocating Mesh Buffers

- [newZone(_:)](modelio/mdlmeshbufferallocator/newzone(_:).md)
- [newBuffer(_:type:)](modelio/mdlmeshbufferallocator/newbuffer(_:type:).md)
- [newBuffer(from:length:type:)](modelio/mdlmeshbufferallocator/newbuffer(from:length:type:).md)
- [newBuffer(with:type:)](modelio/mdlmeshbufferallocator/newbuffer(with:type:).md)
- [newBuffer(from:data:type:)](modelio/mdlmeshbufferallocator/newbuffer(from:data:type:).md)
