Last active
February 22, 2016 13:48
-
-
Save dcunited001/bfb48a18e72d845452ad to your computer and use it in GitHub Desktop.
pointers example in swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// it's been a minute, so this probably doesn't run | |
class Foo | |
var mvpPointer: UnsafeMutablePointer<Void>? { get set } | |
} | |
let f = Foo() | |
let barz = [0 1 2 3] | |
memcpy(mvpPointer!, &barz, barz.count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment