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. QWebsocket sendBinaryMessage memory leak
Qt 6.11 is out! See what's new in the release blog

QWebsocket sendBinaryMessage memory leak

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 2 Posters 1.5k 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.
  • S Offline
    S Offline
    Shelton
    wrote on last edited by
    #1

    Qt version: 5. 12
    OS: Windows 7 64
    Using QWebsocket to communicate with remote server. Every time calling the member function sendBinaryMessage, the system memory occupied by the process raised. Really confused! Really need help!

    jsulmJ 1 Reply Last reply
    0
    • S Shelton

      Qt version: 5. 12
      OS: Windows 7 64
      Using QWebsocket to communicate with remote server. Every time calling the member function sendBinaryMessage, the system memory occupied by the process raised. Really confused! Really need help!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Shelton said in QWebsocket sendBinaryMessage memory leak:

      Really need help!

      Then post your code...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 2 Replies Last reply
      1
      • S Offline
        S Offline
        Shelton
        wrote on last edited by
        #3

        IMG_20200729_090651.jpg

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @Shelton said in QWebsocket sendBinaryMessage memory leak:

          Really need help!

          Then post your code...

          S Offline
          S Offline
          Shelton
          wrote on last edited by
          #4

          @jsulm IMG_20200729_090706.jpg

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @Shelton said in QWebsocket sendBinaryMessage memory leak:

            Really need help!

            Then post your code...

            S Offline
            S Offline
            Shelton
            wrote on last edited by
            #5

            @jsulm as the pics above, I got a global object to handle websocket processing using singleton mode. Init the ws state in the construction func, and define a function (send(QByteArry &data))to communicate with remote ws server. In the send(QByteArry &data) function,there is only one line:m_websock.sendBinaryMessage(data).I call the send() function in every 10ms, then the memory of the processing just keep raising... Really confused!

            jsulmJ 1 Reply Last reply
            0
            • S Shelton

              @jsulm as the pics above, I got a global object to handle websocket processing using singleton mode. Init the ws state in the construction func, and define a function (send(QByteArry &data))to communicate with remote ws server. In the send(QByteArry &data) function,there is only one line:m_websock.sendBinaryMessage(data).I call the send() function in every 10ms, then the memory of the processing just keep raising... Really confused!

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Shelton said in QWebsocket sendBinaryMessage memory leak:

              as the pics above

              Please post code as text, not pictures.

              From the code you posted I don't see why memory usage should grow. But this is not all relevant code. What is this data and how is it used?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              S 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Shelton said in QWebsocket sendBinaryMessage memory leak:

                as the pics above

                Please post code as text, not pictures.

                From the code you posted I don't see why memory usage should grow. But this is not all relevant code. What is this data and how is it used?

                S Offline
                S Offline
                Shelton
                wrote on last edited by
                #7

                @jsulm data caught by microphone, size 1280bytes, sending period every 10ms

                jsulmJ 1 Reply Last reply
                0
                • S Shelton

                  @jsulm data caught by microphone, size 1280bytes, sending period every 10ms

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Shelton said in QWebsocket sendBinaryMessage memory leak:

                  data caught by microphone, size 1280bytes, sending period every 10ms

                  Sorry, but this does not help. Without code I have no idea...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  S 2 Replies Last reply
                  0
                  • jsulmJ jsulm

                    @Shelton said in QWebsocket sendBinaryMessage memory leak:

                    data caught by microphone, size 1280bytes, sending period every 10ms

                    Sorry, but this does not help. Without code I have no idea...

                    S Offline
                    S Offline
                    Shelton
                    wrote on last edited by
                    #9

                    @jsulm thank you so much! would you please be so kind to run the qt example "qml websocket server", and keep sending msg by clicking the window. the memory usage is also raising.

                    1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Shelton said in QWebsocket sendBinaryMessage memory leak:

                      data caught by microphone, size 1280bytes, sending period every 10ms

                      Sorry, but this does not help. Without code I have no idea...

                      S Offline
                      S Offline
                      Shelton
                      wrote on last edited by
                      #10

                      @jsulm thank you so much! would you please be so kind to run the qt example "qml websocket server", and keep sending msg by clicking the window. the memory usage is also raising.

                      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