Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Use QSharedmemory for Singleton object for more Processes

Use QSharedmemory for Singleton object for more Processes

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 683 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    M001
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      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.

      Greetz, Jeroen

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved