美文网首页
解决内存暴涨的问题,下面的方法会造成内容暴涨,

解决内存暴涨的问题,下面的方法会造成内容暴涨,

作者: 布谷布谷7788 | 来源:发表于2018-08-07 17:16 被阅读0次

-(UIImage*)getNormalImage:(UIView*)view{

    float width = [UIScreen mainScreen].bounds.size.width;

    float heigt = [UIScreen mainScreen].bounds.size.height;

    UIGraphicsBeginImageContext(CGSizeMake(width, heigt));

    CGContextRef context = UIGraphicsGetCurrentContext();

    [view.layer.presentationLayer renderInContext:context];

    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();

    returnimage;

}

不停的使用以上方法,造成了内存暴涨的现象

相关文章

网友评论

      本文标题:解决内存暴涨的问题,下面的方法会造成内容暴涨,

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