Memory leak in VB

做~自己de王妃 提交于 2019-12-02 09:43:26

Your code doesn't compile, TestClass doesn't implement the Dispose() method.

I can guess what you are seeing though. There's a known bug in the Edit+Continue support code that the VB.NET compiler generates. It uses a WeakReference to track assigned event handlers, that WR object is leaked when you run your code without a debugger. Check if you can fix your problem by either commenting out the Event or by running the Release build of your code.

You cannot ship the Debug build of your project, it will bomb with OOM when those leaked WeakReference objects consume all memory. Only ever ship the Release build.

Ok I found an answer on this post. The guy had the same problem.

http://bytes.com/topic/visual-basic-net/answers/619203-memory-leak

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!