We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
”WeekHashMap 的这个特点特别适用于需要缓存的场景“ —— 针对博主说的这句话想到的:既然WeekHashMap是弱引用,那么不管内存是否紧张value都有可能会被回收 ; 而软引用,只有当内存不足时才会被回收,那岂不是用软引用更合适,而弱引用在内存泄漏方面更合适一些,博主怎么看?
The text was updated successfully, but these errors were encountered:
这是我描述的误导,我的意思是(从WeekHashMap的角度说)WeekHashMap用作缓存比较合适,并不是说缓存场景中WeekHashMap是首选。通常缓存系统需要考虑两个问题:1.缓存大小限制,2.大小达到上限时的替换策略(LRU, FIFO)。从这两个标准上讲,将大小限制以及替换策略交给虚拟机并不是最好的选择。
Sorry, something went wrong.
No branches or pull requests
”WeekHashMap 的这个特点特别适用于需要缓存的场景“ —— 针对博主说的这句话想到的:既然WeekHashMap是弱引用,那么不管内存是否紧张value都有可能会被回收 ; 而软引用,只有当内存不足时才会被回收,那岂不是用软引用更合适,而弱引用在内存泄漏方面更合适一些,博主怎么看?
The text was updated successfully, but these errors were encountered: