[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Remoted objects never garbage collected.

(Barry Anderberg)

7/22/2004 2:09:00 AM

I have an application which handles events raised remotely. The
object through which the events are raised is remoted to my
application, and it has had its InitializeLifetimeService method
overridden to return null, so that it stays alive for the lifetime of
the application.

When these events are raised, one of the arguments to the event
handler is an object (call it Carrier) that contains, among other
things, a string. These events are raised thousands and thousands of
times over the course of an hour, and during that time the .NET
Profiler by SciTech shows that string objects are allocated but remain
"alive", ie. reachable and thus are never garbage collected. Of
course, the program eventually starts to buckle as it has consumed all
available memory.

If I examine the root path of these string objects they're all
contained in various Carrier objects that have been sent over the
lifetime of the app.

The odd thing is that the .NET Profiler does NOT indicate that the
Carrier objects are not being garbage collected. How is this
possible?

Please help me! I do not know remoting that well and our application
has to be restarted every day to keep it running!!!