美文网首页
UIGraphicsGetImageFromCurrentIma

UIGraphicsGetImageFromCurrentIma

作者: AnderQZ | 来源:发表于2019-08-01 18:14 被阅读0次

    这个函数比较坑爹,用一次爆一次,如果一瞬间调用几十次,那么内存会撑到1G多后秒爆。

    解决方法:

    在调用函数外层添加@autoreleasepool { }就可以了。

    Ps: 具体原因分析看底部参考文章。

    参考:https://www.jianshu.com/p/6c73850a338c

    相关文章

      网友评论

          本文标题:UIGraphicsGetImageFromCurrentIma

          本文链接:https://www.haomeiwen.com/subject/tjbcdctx.html