title: How do you alloc/dealloc unsafe pointers in Swift?
body: <p>With Beta 4, I had this code that worked fine:</p>
  
  <pre><code>var red, green, blue, alpha: UnsafePointer&lt;CGFloat&gt;
  red = UnsafePointer&lt;CGFloat&gt;.alloc(1)
  green = UnsafePointer&lt;CGFloat&gt;.alloc(1)
  blue = UnsafePointer&lt;CGFloat&gt;.alloc(1)
  alpha = UnsafePointer&lt;CGFloat&gt;.alloc(1)
  myColor.getRed(red, green: green, blue: blue, alpha: alpha)
  
  CGContextSetRGBStrokeColor(context, red.memory, green.memory, blue.memory, 1)
  
  red.dealloc(1)
  green.dealloc(1)
  blue.dealloc(1)
  alpha.dealloc(1)
  </code></pre>
  
  <p>Now with Beta5, I get the error "'UnsafePointer.Type' does not have a member named 'alloc'".</p>
  
  <p>All I'm trying to do is set the stroke color of the CGContext based on a UIColor.  How am I supposed to do this now?  The "withUnsafePointers" function is a bit of a joke - it's giving strange errors, and it only takes a maximum of three unsafe pointers, whereas I'm trying to use four in this case.</p>