ServicedComponent 未在终结器中处置
需要回答的问题:
客户端ServicedComponent的终结器是否调用ServicedComponent.DisposeObject或Dispose?
相对于客户端的使用情况,com 服务器中应该如何进行销毁(内存释放)?
基本上 - 我们正在达到 COM 服务器的进程大小(内存)2 gig 限制,因为内存没有被释放 - 解决方案是显式调用 Dispose 或在客户端中使用 using 语句?
Questions needing answers :
Does the finalizer of the client side ServicedComponent call ServicedComponent.DisposeObject or Dispose?
How should destruction (release of memory) occur in the com server in relation to its usage in the client?
Basically - we are reaching a 2 gig limit on process size (memory) of the COM server as memory is not being released - is the solution to call explicitly call Dispose or use the using statement in the client?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您绝对应该在客户端调用
Dispose
或ServicedComponent.DisposeObject
。微软表示“最好使用Dispose设计模式而不是 DisposeObject。”COM+ 中到底发生了什么取决于以下几件事:
如果调用不在进程中,则有可能租赁时间可能会发挥作用。 了解 .NET 中的企业服务 (COM+) 是最好的书籍之一我读过 COM+ 文章,但由于它是 2002 年写的,我想知道它是否仍然 100% 准确。
You should definitely be calling either
Dispose
orServicedComponent.DisposeObject
on the client side. Microsoft says "It is preferable to use the Dispose design pattern rather than DisposeObject."Exactly what is happening in COM+ will depend on a few things:
If the calls are out of process then it is possible that lease times may come into play. Understanding Enterprise Services (COM+) in .NET is one of the best COM+ articles I've read but, since it was written in 2002, I wonder if it is still 100% accurate.