Results 1 to 8 of 8

Thread: Can't create QSharedMemory on macOS Catalina

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,333
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    317
    Thanked 871 Times in 858 Posts

    Default Re: Can't create QSharedMemory on macOS Catalina

    Since heap-allocated memory is freed on program exit there's no need for explicit free().
    That isn't the case for shared memory if there are other processes attached to it. It is probably reference counted. As the documentation says, unless the QSharedMemory destructor is called (decrementing the reference count), you cannot be guaranteed that the OS will release the memory. Heap that is freed when a process exits is simply freed without calling any destructors. That's why you can have a program with a memory leak and have all the leaked memory freed on exit.

    i don't know what the problem is with your program. Maybe your choice of "foo" as the key? Pretty common thing for a programmer to use as a name for testing purposes.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:


Similar Threads

  1. Compatibility of El Capitan Qt-based apps on new catalina
    By ghorwin in forum Installation and Deployment
    Replies: 0
    Last Post: 17th October 2019, 14:33
  2. Qt Creator Unable to create/open qmake project under MacOS X
    By googie in forum Qt Tools
    Replies: 3
    Last Post: 27th August 2014, 06:45
  3. Replies: 1
    Last Post: 8th May 2013, 11:09
  4. Create new QsharedMemory after crash
    By dashesy in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2012, 07:01
  5. Create Qt Application Bundle in MacOs
    By joy in forum Installation and Deployment
    Replies: 2
    Last Post: 25th February 2008, 18:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.