Hi,
When you pass an object that inherits from MarshalByRefObject to a different AppDomain, won't GC.Collect() induced by the AppDomain that created it collect the object, provided that the object is not rooted in either AppDomain by the time GC.Collect() called?
[When I say not rooted I mean no developer written code access it anymore.]
It appears that the object is not getting collected but rather getting promoted to the next generation!
But if I stop passing the object to a diff AppDomain, it is getting collected as expected.
Is this behavior by design? If so rationale?
Thanks guys,
P.S. I know GC.Collect() within code is bad for many reasons, I'm just trying to understand how GC would take place on MBROs.