Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Use WeakHashMap for MotionRuntime's target-based caches #76

Closed
pingpongboss opened this issue Apr 24, 2017 · 0 comments
Closed

Use WeakHashMap for MotionRuntime's target-based caches #76

pingpongboss opened this issue Apr 24, 2017 · 0 comments
Assignees

Comments

@pingpongboss
Copy link
Contributor

MotionRuntime.cachedReactiveViews and MotionRuntime.cachedInteractions should both use WeakHashMap instead of SimpleArrayMap.

We do not want to prevent the target Object from being garbage collected. See https://github.com/material-motion/material-motion-android/blob/develop/library/src/main/java/com/google/android/material/motion/ReactiveProperty.java#L36

@randcode-generator randcode-generator self-assigned this Apr 24, 2017
pingpongboss pushed a commit that referenced this issue Apr 24, 2017
Summary:
Use WeakHashMap instead of SimpleArrayMap

Fixes #76

Reviewers: O2 Material Motion, O6 Material Android platform reviewers, #material_motion, markwei

Reviewed By: O2 Material Motion, O6 Material Android platform reviewers, #material_motion, markwei

Tags: #material_motion

Differential Revision: http://codereview.cc/D3102
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants