Skip to content

Instantly share code, notes, and snippets.

View Sombre-Osmoze's full-sized avatar
🌉
Absorbing

Marcus Sombre-Osmoze

🌉
Absorbing
View GitHub Profile
@kirsteins
kirsteins / Array -> UnsafeMutablePointer -> Array
Last active June 16, 2024 09:42
Array -> UnsafeMutablePointer -> Array
var initalArray = [1, 2, 3]
let pointer: UnsafeMutablePointer<Int> = UnsafeMutablePointer(initalArray)
let arrary = Array(UnsafeBufferPointer(start: pointer, count: initalArray.count))