With Beta 4, I had this code that worked fine:
var red, green, blue, alpha: UnsafePointer
red = UnsafePointer.alloc(1)
green = Unsa
This works, Swift is smart enough to know what to do with the & operator:
let color = UIColor.purpleColor()
var r:CGFloat, g:CGFloat, b:CGFloat, a:CGFloat = 0
color.getRed(&r, green: &g, blue: &b, alpha: &a)
CGContextSetRGBStrokeColor(c, r, g, b, a)
If you really want to do the alloc yourself, use your favorite flavor and construct the pointer like this:
let p = UnsafeMutablePointer(calloc(1, UInt(sizeof(CGFloat))))
// later don't forget to free(p)