diff options
author | Winson Chung <winsonc@google.com> | 2015-07-27 17:50:13 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-07-27 18:35:28 -0700 |
commit | eea022530496bb5f53f9ae01fdef0cd9d0e8147d (patch) | |
tree | 904bc603294bc2e4660ba5fba9961a50a156eed9 /WallpaperPicker/res | |
parent | a9095e07ddd2318ceb81a2794219e07dd112df72 (diff) | |
download | android_packages_apps_Trebuchet-eea022530496bb5f53f9ae01fdef0cd9d0e8147d.tar.gz android_packages_apps_Trebuchet-eea022530496bb5f53f9ae01fdef0cd9d0e8147d.tar.bz2 android_packages_apps_Trebuchet-eea022530496bb5f53f9ae01fdef0cd9d0e8147d.zip |
Fixing minor memory leak with name comparator.
- WidgetsAndShortcutNameComparator was using the actual widget and shortcut resolve
infos as the key to the label cache. Neither of these classes override hashCode()
and we were retrieving a new set of widgets and shortcuts whenever packages changed
so we would end up creating more and more entries in the cache. This isn't a huge
leak, but could lead to problems if Launcher is used for long periods without being
killed.
- Now, we use a ComponentKey as the key, so that we don't keep a reference to the
widget/shortcut infos and also ensures that they should hash to the same labels.
Change-Id: I91347ee72363adbc2b075b67dba331e35ab1fe34
Diffstat (limited to 'WallpaperPicker/res')
0 files changed, 0 insertions, 0 deletions