---
title: map()
framework: modelio
role: symbol
role_heading: Instance Method
path: modelio/mdlmeshbuffer/map()
---

# map()

Provides direct, read-only access to the buffer’s contents.

## Declaration

```swift
func map() -> MDLMeshBufferMap
```

## Return Value

Return Value A data object mapped to the storage memory for the buffer.

## Discussion

Discussion The buffer’s storage remains mapped for as long as the returned MDLMeshBufferMap object exists, potentially restricting other uses of that storage. For example, if a buffer’s storage is shared with GPU memory, that buffer may be unavailable for use in rendering until the MDLMeshBufferMap object is deallocated.

## See Also

### Working with Data in a Buffer

- [fill(_:offset:)](modelio/mdlmeshbuffer/fill(_:offset:).md)
- [length](modelio/mdlmeshbuffer/length.md)
