zendesk / belvedere

An image picker library for Android
Apache License 2.0
145 stars 23 forks source link

Prevent memory leak of Callback in ImageStream, update README #105

Closed brendan-fahy closed 4 years ago

brendan-fahy commented 4 years ago

Description

The Callback class's Javadoc says that direct references to it should be managed by clients, because ResolveUriTask uses a WeakReference for its Callback.

Unfortunately, our README didn't accurately reflect this important part of its usage (the code snippets showed anonymous inner Callback classes), and our ImageStream implementation also was not handling it properly.

Changes

Reviewers

@zendesk/adventure-android @zendesk/two-brothers-android @zendesk/ogham-android

FYI

@schlan

References

Risks

schlan commented 4 years ago

I can't :(

schlan commented 4 years ago

🙍‍♂