About Sdwebimage loading HD images causing app crashes

Source: Internet
Author: User

Links are the way to use Sdwebimage

Http://www.cnblogs.com/JimmyBright/p/4457258.html

When using Sdwebimage to load high-definition images, it is often reported that memory overflow errors cause the program to crash directly. For example, your program loads 10 or so photos of the SLR, each of which is around 10M, using Sdwebimage to download the cache display method, the program will definitely hang up, view memory icon is generally the case

This program generally runs memory consumption is about 13M, but after loading a picture of about 10M, suddenly there is a rise, soaring to 178M, then, then, the program will be hung off. This problem, many people have met, online should be no answer, and some are said to encounter large map resize to a small map, either client processing, or server processing, did not fundamentally solve the problem.

After trying, we found a simple way to solve the problem perfectly.

As above, when assigning value to ImageView, clear the memory, so that the contents of the download will not repeat the overlay resulting in insufficient memory, each time the download has emptied the memory. After the program runs, the memory chart will still have a sudden crest, but after verification, it's okay.

About Sdwebimage loading HD images causing app crashes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.