Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved qt and memory usage

    General and Desktop
    2
    2
    473
    Loading More Posts
    • 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.
    • E
      Erni42 last edited by

      Hi and hello,

      i program an application showing different diagrams coming from one set of data. I put the diagrams on QLabel pixmap and put the labels on different tabs on a QTabWidget. All arranged with QT's layout system.
      After opening the data file, the first tab with text information is shown. If i switch to the first diagram tab, the program uses 3MB more memory, if i go to the next diagram tab, the memory usage increases. But all diagrams created at read time of the data file. Why does the program consumes more memory by showing the diagrams?
      If I load a different file, all tabs are destroyed but finally after showing all diagrams the application consumes more memory than ever before. Means, after open 100 files, the memory is completely used by my application.
      Where can i look for the reason?

      Thanks
      Erni24

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        You should first check how you are creating the pixmaps, then if you are properly releasing the memory you might have allocated.

        Depending on the OS you are running, you can use Valgrind to help you check your memory usage.

        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 Reply Quote 0
        • First post
          Last post