美文网首页
ios 图片处理-内存疯长的解决办法

ios 图片处理-内存疯长的解决办法

作者: 一代枭雄 | 来源:发表于2021-12-18 14:13 被阅读0次

    #pragma mark --- 高分辨率的图片禁止图片解压缩操作

    [[SDImageCache sharedImageCache] setShouldDecompressImages:NO]; [[SDWebImageDownloader sharedDownloader] setShouldDecompressImages:NO]; SDImageCache *canche = [SDImageCache sharedImageCache]; canche.shouldDecompressImages = NO; SDWebImageDownloader *downloder = [SDWebImageDownloader sharedDownloader]; downloder.shouldDecompressImages = NO;

    -(void)dealloc {

        SDImageCache *canche = [SDImageCache sharedImageCache];

        canche.shouldDecompressImages = YES;

        SDWebImageDownloader *downloder = [SDWebImageDownloader sharedDownloader];

        downloder.shouldDecompressImages = YES;

    }

    相关文章

      网友评论

          本文标题:ios 图片处理-内存疯长的解决办法

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