Contents

Pointer in UnSafe Swift

Pointers

Unsafe Swift pointers use a predictable naming scheme:

Unsafe [Mutable][Raw][Buffer]Pointer[<T>]

Explain:

Pointers are just memory addresses.
Direct memory access is Unsafe.
Mutable means you can write to it.
Raw means it points to a blob of bytes.
Buffer means that is works like a collection.
Generic [<T>] pointers are typed.

Working with Pointers

C PointerSwift Type
int *UnsaftMutablePointer
const int *UnsafePointer
NSDate **AutoreleasingUnsafeMutablePointer
struct UnknowType *OpaquePointer
void *UnsafeMutableRawPointer
const void *UnsafeRawPointer

Explain: see here

Pointer Safety

Safely manage pointers in Swift

Usage

see here and here