a singleton (static, global) object is used from the main app as well as from an dynamical loaded .so/.dll
I observe the following differences in behavior under linux and windows:
under linux the object is created once, at the first call to the singletons instance function (i checked with debug output in the ctor of the class)
but under windows the object is created twice: one time when the main app calls instance() the first time and a second time when instance() is called from the dll for the first time. As you can imagine that behavior really sucks if you want to access consistent data stored in the singleton object from the main app as well as from the dll.
Is there any way to get the behavior under windows/dll exact like under linux/so?