When you pass an object that inherits from MarshalByRefObject to another AppDomain, there will be no GC.Collect () called by the AppDomain that created it, collects the object, provided that the object is not embedded in the AppDomain by the time GC.Collect () is called?
[When I say that I am not rooted, I mean that the developer did not get access to it.]
It seems that the object is not going to gather, but gets promoted to the next generation!
But if I stop passing the object to diff on AppDomain, it will be built as expected.
Is this design behavior? If so justified?
Thanks guys,
PS I know that GC.Collect () inside the code is bad for many reasons, I'm just trying to figure out how the GC will go on MBRO.
source share