fixed lru array delete cache
This commit is contained in:
parent
2a6ae2fe90
commit
10dd677612
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@
|
|||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.rar
|
*.rar
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
*.exe
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
@ -81,7 +81,8 @@ public class LRUBasedArray<T> {
|
|||||||
* @param object
|
* @param object
|
||||||
*/
|
*/
|
||||||
public void removeAndCache(T object) {
|
public void removeAndCache(T object) {
|
||||||
value[--count] = null;
|
T key = value[--count];
|
||||||
|
holder.remove(key);
|
||||||
cache(object, count);
|
cache(object, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user