Memory spike in pb_takeSnapshot function
Hey there! Love the work! Noticed some unusual memory behavior.

The memory usage increases by a lot every time I tap to open a cell (which will then load images with SDWebImage, as well as other data from the server), but it never comes down. Now, I understand dealing with images is expensive, but is there a way to work around this issue? Please let me know what you think.
and it crashes too
This Code solves it and so much faster func takeSnapshot(_ frame: CGRect) -> UIImage? { UIGraphicsBeginImageContextWithOptions(frame.size, false, 0) defer { UIGraphicsEndImageContext() } self.drawHierarchy(in: self.bounds, afterScreenUpdates: true) return UIGraphicsGetImageFromCurrentImageContext() }