<!--
{
  "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/MDLAsset/bufferAllocator",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLAsset(py)bufferAllocator"
  },
  "title" : "bufferAllocator"
}
-->

# bufferAllocator

An object responsible for allocating mesh vertex data loaded from the asset.

```
var bufferAllocator: any MDLMeshBufferAllocator { get }
```

## Discussion

You specify an allocator when loading an asset with the [`init(url:vertexDescriptor:bufferAllocator:)`](/documentation/ModelIO/MDLAsset/init(url:vertexDescriptor:bufferAllocator:)-1tchi) initializer. If you do not specify an allocator, or import an asset through other means, the [`MDLAsset`](/documentation/ModelIO/MDLAsset) class uses an internal allocator object.

For example, to use the MetalKit framework for loading vertex data into GPU buffers for rendering with Metal, pass a <doc://com.apple.documentation/documentation/MetalKit/MTKMeshBufferAllocator> object for the `bufferAllocator` parameter. By specifying an allocator, you ensure that mesh data is copied a minimal number of times between being read from a file and being loaded into GPU memory for rendering.

---

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)