Hi all,
it seems for me that in Java world there is much freedom
in controlling the garbage collector than in .NET: JDK
includes SoftReference and WeakReference classes,
while .NET supports only WeakReferences. Is there any way
to simulate soft references in .NET? Or why they are
missed?
I'm not a guru in .NET garbage collector, and I have a
problem: in my Java application there is a cache based on
soft references, and all works fine. When I ported the
application to the .NET, the cache becomes using weak
references, and it's behavior is now far from good: weak
references die too often, so the application needs to
rebuild cached object which is time-consuming procedure.
Thanks in advance,
Dmitry
Jay B. Harlow [MVP - Outlook] - 04 Sep 2003 15:48 GMT
Dmitry,
For those of use not fluent in Java, can you explain (or give link) on what
a SoftReference is & how you would use it in your Cache?
Then I or someone else may be able to offer suggestions on how to better
approximate them in .NET.
At the very least it does sound like something I would find useful.
Hope this helps
Jay
> Hi all,
>
[quoted text clipped - 15 lines]
> Thanks in advance,
> Dmitry
Jay B. Harlow [MVP - Outlook] - 04 Sep 2003 15:59 GMT
Dmitry,
Does the "Caching Application Block for .NET" give you closer to what you
want?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/Cach
ingBlock.asp
Granted its not SoftReferences per se.
Hope this helps
Jay
> Hi all,
>
[quoted text clipped - 15 lines]
> Thanks in advance,
> Dmitry