[swift-users] Debugger woes
Maury Markowitz
maury.markowitz at gmail.com
Fri Feb 3 08:55:05 CST 2017
> On Jan 31, 2017, at 1:59 PM, Jim Ingham <jingham at apple.com> wrote:
>
> From the symptoms, it looks like the compiler is not holding onto "background" because it is no longer used. That's a desirable thing to do for optimized code, but not at -O0.
>
> What happens if you rewrite this to:
>
> let background = sceneView.snapshot().cgImage!
> let cropped = background.cropping(to: overlayView.frame)
> UIGraphicsBeginImageContextWithOptions(overlayView.frame.size, false, 1.0)
> print(background)
I've been battling H3N2 so I only got a chance to try this now. Indeed, the 'background' variable is "alive" in this version, I assume because of the print() that follows?
Should I file through the normal Apple Bug Reporter, or is there a better mechanism for Swift-related issues?
More information about the swift-users
mailing list