---
title: "init(bytes:deallocator:)"
framework: modelio
role: symbol
role_heading: Initializer
path: "modelio/mdlmeshbuffermap/init(bytes:deallocator:)"
---

# init(bytes:deallocator:)

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

## Declaration

```swift
init(bytes: UnsafeMutableRawPointer, deallocator: (() -> Void)? = nil)
```

## Parameters

- `bytes`: A pointer to the data buffer to be managed by the buffer map.
- `deallocator`: Model I/O calls this block when the buffer map object is deallocated. Use this block to unmap a shared buffer or perform other cleanup tasks. The block has no parameters and no return value.

## Return Value

Return Value A new buffer map object.
