If I call the following function (drawBlackRect) from AppDelegate didFinishLaunchingWithOptions and play with the pdf (zoom in/out, swipe to next page etc ...), the memory usage of the app is getting very high until the app eventually crashes. I also added the same code translated to objective c to PhotoScroller, and the issue doesn't reproduce.
If I call the following function (drawBlackRect) from AppDelegate didFinishLaunchingWithOptions and play with the pdf (zoom in/out, swipe to next page etc ...), the memory usage of the app is getting very high until the app eventually crashes. I also added the same code translated to objective c to PhotoScroller, and the issue doesn't reproduce.
func drawBlackRect() { DispatchQueue.global(qos: .default).asyncAfter(deadline: .now() + .milliseconds(500)) {