.NET Remoting memory leak?
Posted
by PrimeTSS
on Stack Overflow
See other posts from Stack Overflow
or by PrimeTSS
Published on 2010-04-18T13:02:56Z
Indexed on
2010/04/18
13:13 UTC
Read the original article
Hit count: 532
I have a Remoting Class as a Singleton
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown
mode="Singleton"
type="PTSSLinkClasses.PTSSLinkClientDesktopRemotable, PTSSLinkClasses"
objectUri="PTSSLinkDesktop" />
</service>
<channels>
<channel ref="http" port="8901"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
Its created within a "server" Service. Another client service consumes this remote object. The client is calling the remote object every .5 second using a timer (polling) (for testing)
If the server service is stopped, so the remote object is not available, memory useage for the client service keeps increasing......
I have overwritten InitialLifetimeService to return a null
public override Object InitializeLifetimeService()
{
return null;
}
If a remote object is not available does .net queue all the call requests to this object??? untill all the memory is consumed? How can I dected if the remote object is not available and stop trying to call the remote method?
© Stack Overflow or respective owner