Created
March 10, 2017 19:42
-
-
Save SiarheiFedartsou/7f7be7cb89c8b3bc722a4e6fa603c195 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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