Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / September 2003

Tip: Looking for answers? Try searching our database.

Soft and weak references

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dmitry Shaporenkov - 04 Sep 2003 09:10 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.