Skip to content

Commit

Permalink
docs: Rename to holder
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jan 13, 2025
1 parent bf28dc4 commit aadec41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/docs/types/array-buffers.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ On the native side, an **owning** `ArrayBuffer` can either **wrap-**, or **copy-
let myData = UnsafeMutablePointer<UInt8>.allocate(capacity: 4096)

// wrap (no copy)
let wrappingArrayBuffer = ArrayBuffer.wrap(dataWithoutCopy: myData,
size: 4096,
onDelete: { myData.deallocate() })
let wrappingArrayBuffer = ArrayBufferHolder.wrap(dataWithoutCopy: myData,
size: 4096,
onDelete: { myData.deallocate() })
// copy
let copiedArrayBuffer = ArrayBuffer.copy(of: wrappingArrayBuffer)
let copiedArrayBuffer = ArrayBufferHolder.copy(of: wrappingArrayBuffer)
// new blank buffer
let newArrayBuffer = ArrayBuffer.allocate(size: 4096)
let newArrayBuffer = ArrayBufferHolder.allocate(size: 4096)
```
</TabItem>
<TabItem value="kotlin" label="Kotlin">
Expand Down

0 comments on commit aadec41

Please sign in to comment.