I created a cache using Soft References a while ago, but in trying to resolve a bug I\'m getting concerned that actually I\'ve done it incorrectly and it\'s removing objects when it shouldn\'t. This i
I trying to implement a write-back cache.I\'m trying to use soft referenes, but I\'m having troubles performing the post-mortum write-back because the referenc开发者_如何学JAVAe is cleared before it\'
I\'m going to use a SoftReference-based cache (a pretty simple thing by itself). However, I\'ve came across a problem when writing a test for it.
Can someone explain the difference between the three Reference classes (or post a link to a nice explanation)? SoftReference > WeakReference > PhantomReference, but when would I use each one? Why is t
In C++ I\'m using boost::shared_ptr and boost::weak_ptr to automatically delete objects that are no longer needed. I know these work with reference counting.
To get any code with SoftReference<T> to be fully tes开发者_运维问答ted, one must come up with some way to test the \'yup, it\'s been nulled\' case. One might more or less mock this by using a \
I am using a search library which advises keeping search handle object open for this can benefit query cache. Over the time I have observed that the cache tends to get bloated (few hundred megs and ke