Another iPhone - CGBitmapContextCreateImage Leak

后端 未结 5 1421
心在旅途
心在旅途 2020-12-10 08:40

Like in this post:

  • iPhone - UIImage Leak, ObjectAlloc Building

I\'m having a similar problem. The pointer from the malloc in create_bitmap

5条回答
  •  被撕碎了的回忆
    2020-12-10 09:25

    You're not the only one with this problem. I've had major problems with CGBitmapContextCreateImage(). When you turn on Zombie mode, it even warns you that memory is released twice (when it's not the case). There's definitely a problem when mixing CG* stuff with UI* stuff. I'm still trying to figure out how to code around this issue.

    Side note: calling UIGraphicsBeginImageContext is not thread-safe. Be careful.

提交回复
热议问题