Skip to content

Instantly share code, notes, and snippets.

@SiarheiFedartsou
Created March 10, 2017 19:42
Show Gist options
  • Save SiarheiFedartsou/7f7be7cb89c8b3bc722a4e6fa603c195 to your computer and use it in GitHub Desktop.
Save SiarheiFedartsou/7f7be7cb89c8b3bc722a4e6fa603c195 to your computer and use it in GitHub Desktop.
func dummy<T>() -> T {
let memory = UnsafeMutablePointer<T>.allocate(capacity: 1)
let dummy = memory.pointee
memory.deallocate(capacity: 1)
return dummy
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment