阅读背景:

什么是“DefInstance”,我应该从WinForms应用程序中删除它吗?

来源:互联网 

I am working on a VB.NET WinForms app that was "upgraded" by Visual Studio (originally 1.0 or 1.1) from VB6 code (which was itself upgraded from VB5). Except for the few new forms I've created since taking over maintenance of this app, all of the forms in the application have a method called DefInstance which allows you to grab an in-memory copy of the form if there is one. What I can't figure out is why: when would I ever need to reference a form object in memory when it's not immediately in scope where I'm working. To my mind this violates all kinds of sound programming principles and seems like an invitation for memory leaks or worse.I am working on a VB.NET WinForms app that was




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: