Originally Posted by
Elysia
Basically, it's an optimization bug, then?
Ok, there is one class declared this way:
Code:
class __declspec(dllimport) ...
The c'tor of this class calls the Singleton classes the first time. Now there are other classes calling the member function of the Singletons and without optimization it works but with optimization it doesn't. I narrowed one function down to:
Code:
for (int i=0; i<10; ++i)
{
}
for (int i=0; i<10; ++i)
{
}
double d = Params::Instance().getVal1();
where a new Instance is only created if there are two or more of those dummy loops (optimization turned on). I don't now if the dll import has something to do with it or not. Imho it doesn't explain the random behaviour described above.
Inlining still works perfectly with or without optimization.
Thanks for your help!