fixed lru array delete cache

This commit is contained in:
milley 2019-01-22 23:49:47 +08:00
parent 2a6ae2fe90
commit 10dd677612
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -19,6 +19,7 @@
*.tar.gz
*.rar
*.DS_Store
*.exe
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

View File

@ -81,7 +81,8 @@ public class LRUBasedArray<T> {
* @param object
*/
public void removeAndCache(T object) {
value[--count] = null;
T key = value[--count];
holder.remove(key);
cache(object, count);
}