简体   繁体   English

SDWebImage在滚动时清除图像缓存?

[英]SDWebImage clear cache for image while scrolling?

Can anyone please enlighten me how to clear cache while scrolling through images? 任何人都可以请教我如何在滚动图像时清除缓存? im using SDwebImage package.It is working till 110 photos after that it giving memory receive warning and getting crash i have tried following method also but no success: 即时通讯使用SDwebImage包。它正在工作,直到110照片后,它给内存接收警告和崩溃我尝试了以下方法,但没有成功:

SDImageCache *imageCache = [SDImageCache sharedImageCache];

[imageCache clearMemory]; [imageCache clearMemory]; [imageCache clearDisk]; [imageCache clearDisk]; [imageCache cleanDisk];`` [imageCache cleanDisk];``

after this code it scroll 10 more photo after that get crash. 在此代码之后,它会在崩溃后再滚动10张照片。

try [imageCache release]; 试试[imageCache release]; or autorelease while initiating or try writing in 或者在启动或尝试写入时自动释放

-(void)dealloc
{
   [super dealloc];  
  [imageCache release];
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM