On the problem of creating contextual memory booms
- the size parameter of the UIGraphicsBeginImageContextWithOptions function is too large, resulting in a memory explosion
- I use size data, which is about 3 times the height and width of the screen size, that is (3 UIScreen.main.bounds.height,3 UIScreen.main.bounds.width), but generates a lot of memory when generating the image context, which is definitely not possible
- how to generate smaller image context memory, I thought about one way to solve it, which is to generate a local context, but it feels like there are too many steps.
- I hope some friends can discuss this problem with me and come up with a better solution