Use QSharedmemory for Singleton object for more Processes
-
hey,
i want to use a singleton object in multiple processes. Can i use a qsharedmemory to store the singleton object in it and access it from all the processes? Or is there another way to share my singleton object between processes?
the singleton conects to a database and has several methods to get and set data from and into the database. -
I don't think so.
A class is so much more then just a block of shared memory. A class is also pieces of code, ram variables in functions etc etc. Just because it's a singleton doesn't mean that the used RAM variables are at a constant size.