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. Is it possible to use Qt without dynamic memory management? I want to use pools for everything.
Qt 6.11 is out! See what's new in the release blog

Is it possible to use Qt without dynamic memory management? I want to use pools for everything.

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.5k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    BartekBl
    wrote on last edited by
    #1

    It would be especially welcome feature for embedded development, where memory is constrained and I want to make sure that I have enough for everything. Even if I waste a little memory when for example two features are never used simultaneously but I reserve space for both of them. Still its better than an application which seems to work until it doesn't. I just need to be sure. And by "use pools for everything" I mean everything. All those little objects like QSharedPointer control block or connection or something else should also be pool-managed.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Sounds like you need to use your own implementation of new then?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BartekBl
        wrote on last edited by
        #3

        Thanks. Hadn't thought of of that. Do you think that anyone has done anything like this or similar? I now I didn't but I'll be happy to try.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          I don't know, never tried something like this myself...

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            IIRC, there was qMalloc, qFree and qRealloc meant for that use case

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Problem is: those were deprecated years ago.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Sorry for the old pointer. They are not only deprecated but also not used anymore in Qt 5.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                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