Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

HardwareLayerSpringListener #68

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ppamorim
Copy link
Contributor

@ppamorim ppamorim commented Sep 4, 2015

#67 Good news :)

This is not the final implementation, anyone can review it?

addViews(views);
}

public HardwareLayerSpringListener(WeakHashMap<Integer, View> weakViews) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This constructor seems unnecessary. I'd prefer to just have the var args version. Sharing a HashMap between a caller and this class seems fragile.

@ppamorim
Copy link
Contributor Author

ppamorim commented Sep 4, 2015

@willbailey Updated :)

/**
* WeakHashMap can avoid any memory leak, needs to be tested.
*/
private WeakHashMap<Integer, View> weakViews = new WeakHashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just use

List<WeakReference<View>> 

@ghost ghost added the CLA Signed label Jul 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants