MarshalByRefObject 是如何实现的?
我想知道如何实现 MarshalByRefObject 以及为什么它可以在远程处理中通过引用传递对象。
是否可能是因为 MarshalByRefObject
类的实现,或者远程处理库只是检查该类是否从 MarshalByRefObject
派生?
I would like to know how the MarshalByRefObject
is implimented and why does it make it possible to pass objects by reference in remoting.
Is it possible because of the implementation of the MarshalByRefObject
class, or does the remoting libraries just check whether the class derived from MarshalByRefObject
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MarshalByRefObject 类本身的实现并没有那么特别;重要的魔力是由 CLR(尤其是 JIT)在低级别实现的。正如雅各布提到的,这已经已经讨论过;一些最有用的信息位于 一篇文章 ' cbrumme'。
The implementation of the MarshalByRefObject class itself is not that special; the important magic is implemented by the CLR (especially the JIT) at a low level. This has been discussed already as Jacob mentioned; some of the most useful information is in an article by 'cbrumme'.