> On Feb 3, 2017, at 6:55 AM, Maury Markowitz <maury.markow...@gmail.com> wrote: > >> On Jan 31, 2017, at 1:59 PM, Jim Ingham <jing...@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?
Yes, that's most likely right. > > Should I file through the normal Apple Bug Reporter, or is there a better > mechanism for Swift-related issues? The official word on that is: https://swift.org/contributing/#reporting-bugs Jim _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users