Download image using Sdwebimage, Shareddownloader method download succeeded, new method download failed

Source: Internet
Author: User

One, experience

1. When you create a download object using the new method, the downloaded picture always fails and does not perform a successful or failed callback.

2. Refer to someone else's code, with the Shareddownloader to create the download object, you can download the picture smoothly.

3. Look at the Sdwebimage source code, found that the source code in the Shareddownloader method is purely a singleton method, the same will call the new method.

4. After the solution, I suspect that the object created by the new method will soon be destroyed, and that the downloaded object created by Shareddownloader will not be destroyed and therefore downloaded successfully.

Second, Experience summary

1. When a method fails, be sure to try the other methods inside the header file until it succeeds. Most of the time I just can't think of it.

Download image using Sdwebimage, Shareddownloader method download succeeded, new method download failed

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.