Dynamic Libraries Static Objects - Linux
-
wrote on 11 Feb 2015, 23:46 last edited by
Hi all,
I currently have a singleton defined in a shared library:
@InstanceStorage& InstanceStorage::instance()
{
static InstanceStorage instance;return instance;
}
@.pro file: @CONFIG += shared@
I attempt to get the instance of this class in two separate locations:
- Another Shared Lib
- A dynamic plugin
What I'm noticing is that the instance memory address is different in both locations. Any ideas why this might be the case and how I might resolve it?
1/1