阅读背景:

为单例创建静态实例的这些方法有何不同?

来源:互联网 

I have had a bug recently that only manifested itself when the library was built as a release build rather than a debug build. The library is a .NET dll with a COM wrapper and I am using CoCreateInstance to create a class from the dll in an unmanaged c++ app. When I finally tracked the bug down it was caused by accessing a singleton object. I had the singleton instance declared like so:I have had a bug recently that only manifested




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

分享到: