Chapter 9: What prevents operation deallocation before callback execution?

In the final code for the TiltShiftOperation class, at the end of main() we dispatch onImageProcessed(outputImage) to the main thread using [weak self]. Since we use .async, once the callback is dispatched, the main() method exits and the operation is transitioned to isFinished, at which point the OperationQueue releases its strong reference. I’m a bit confused as to what retains the TiltShiftOperation object at this point, ensuring that we can assign ImageView’s image successfully on the main thread.