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

# MDLMeshBufferMap

An object that manages access to a memory buffer used for the data storage of a Model I/O mesh.

```
class MDLMeshBufferMap
```

## Overview

Typically, you do not create [`MDLMeshBufferMap`](/documentation/ModelIO/MDLMeshBufferMap) objects directly. Instead, you use classes supporting the [`MDLMeshBuffer`](/documentation/ModelIO/MDLMeshBuffer) protocol to manage mesh buffer memory shared with a rendering technology—for example, the <doc://com.apple.documentation/documentation/MetalKit/MTKMeshBuffer> class for rendering with Metal. A mesh buffer object vends a [`MDLMeshBufferMap`](/documentation/ModelIO/MDLMeshBufferMap) objects when you use the [`map()`](/documentation/ModelIO/MDLMeshBuffer/map()) method to gain temporary access to the shared memory.

> Important:
> When you use a mesh buffer’s ``doc://com.apple.modelio/documentation/ModelIO/MDLMeshBuffer/map()`` method, the buffer remains mapped for as long as that ``doc://com.apple.modelio/documentation/ModelIO/MDLMeshBufferMap`` object exists. Mapping a buffer may impose restrictions on a system. For example, a buffer in shared GPU memory may be unavailable for rendering while mapped, causing draw calls that use the buffer to fail until the corresponding ``doc://com.apple.modelio/documentation/ModelIO/MDLMeshBufferMap`` object is deallocated.

## Topics

### Creating a Buffer Map

[`-  initWithBytes:deallocator:`](/documentation/ModelIO/MDLMeshBufferMap/init(bytes:deallocator:))

Initializes a buffer map object to manage access to the specified memory.

### Accessing Buffer Data

[`bytes`](/documentation/ModelIO/MDLMeshBufferMap/bytes)

A pointer to the mutable memory managed by the buffer map.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)