Equivalent to SoftReference in .net?
I am familiar with WeakReference , but I am looking for a reference type that is cleared only when memory is low, not simply every time when the gc runs (just like Java's SoftReference ). I'm looking for a way to implement a memory-sensitive cache. Andrew Hare No there isn't an equivalent. Is there a particular reason why WeakReference won't do the job? Here is a similar question to yours: Why doesn't .NET have a SoftReference as well as a WeakReference, like Java? Maybe the ASP.NET Cache class ( System.Web.Caching.Cache ) might help achieve what you want? It automatically remove objects if