Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ImageLoader.newBuilder(). #653

Merged
merged 4 commits into from
Feb 8, 2021

Conversation

colinrtwhite
Copy link
Member

@colinrtwhite colinrtwhite commented Feb 2, 2021

Resolves #614.

Supports building a new ImageLoader instance using an existing instance as a base. This shares resources + configuration between the two instances.

TODO: Needs more tests.

@colinrtwhite colinrtwhite force-pushed the colin/shared_memory_cache branch from de4d612 to 9149e34 Compare February 7, 2021 22:59
@colinrtwhite colinrtwhite marked this pull request as ready for review February 7, 2021 22:59
@@ -52,9 +54,6 @@ import java.io.File
*
* Image loaders are designed to be shareable and work best when you create a single instance and
* share it throughout your app.
*
* It's recommended, though not required, to call [shutdown] when you've finished using an image loader.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this and clarified that you probably don't need to shut down image loaders in the shutdown method doc.

Copy link
Member

@Jawnnypoo Jawnnypoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

@colinrtwhite colinrtwhite merged commit 60adb4e into master Feb 8, 2021
@colinrtwhite colinrtwhite deleted the colin/shared_memory_cache branch February 8, 2021 17:47
colinrtwhite added a commit that referenced this pull request Oct 5, 2022
* Support ImageLoader.newBuilder and sharing memory caches between image loaders.

* Add tests.

* Fix imports.

* Docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow multiple ImageLoaders to share the same memory caches
2 participants