有没有办法在 VB.NET 中 Finalize() 或 Dispose() 模块?
有没有办法在 VB.NET 中 Finalize() 或 Dispose() 模块?有类似下面的情况,需要Dispose()itsUnManagedObject。
Public Module ABC
Private itsUnManagedObject as <Something>
End Module
Is there a way to Finalize() or Dispose() a Module in VB.NET? Have a situation similar to the following and need to Dispose() itsUnManagedObject.
Public Module ABC
Private itsUnManagedObject as <Something>
End Module
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信简短的回答是“不”。您无法处置模块。
http://msdn.microsoft.com/en- us/library/7825002w(v=vs.80).aspx
您可以在“itsUnmanagementObject”上调用 .Dispose()。
I believe the short answer is 'no'. You can't dispose a module.
http://msdn.microsoft.com/en-us/library/7825002w(v=vs.80).aspx
You can call .Dispose() on the 'itsUnmanagedObject'.
我不认为模块应该被实例化,并且我知道模块不能实现 iDisposable。
I don't think modules are meant to be instantiated and I know modules can't Implement iDisposable.