Interacting with C Pointers
11–15 of 15 posts
Re: Interacting with C Pointers
#12Isn't the 'maybeError' var being used uninitialized in the example right about this passage?
Re: Interacting with C Pointers
#13>> For safety, Swift requires the variables to be initialized before being passed with &. This is because it cannot know whether the method being called tries to read from a pointer before writing to it. Isn't the 'maybeError' var being used uninitialized in the example right about this passage?
Re: Interacting with C Pointers
#14I'm a little disappointed with the scope of this writeup. I just finished my first full Swift app this weekend, and by far, the most bothersome part was interacting with the C APIs (CoreMedia, ImageIO, etc.) I would have loved to see more examples of interacting with framework objects like CGImageSources, CMSampleBuffers, etc. For example, CGImageSourceCreateWithURL() returns an Unmanaged !. You can't pass that objec…
There's a teaser at the end that there will be a follow-up article about UnsafePointer.
I just hope they hurry up and post it soon. I have half a large app that relies on UnsafePointers, and I could really use some clear documentation to reassure myself that I'm not abusing them.
Re: Interacting with C Pointers
#15I'm a little disappointed with the scope of this writeup. I just finished my first full Swift app this weekend, and by far, the most bothersome part was interacting with the C APIs (CoreMedia, ImageIO, etc.) I would have loved to see more examples of interacting with framework objects like CGImageSources, CMSampleBuffers, etc. For example, CGImageSourceCreateWithURL() returns an Unmanaged !. You can't pass that objec…
> I'm a little disappointed with the scope of this writeup. There's a teaser at the end that there will be a follow-up article about UnsafePointer. I just hope they hurry up and post it soon. I have half a large app that relies on UnsafePointers, and I could really use some clear documentation to reassure myself that I'm not abusing them.