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. QNetworkAccessManager cache

QNetworkAccessManager cache

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 149 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.
  • J Offline
    J Offline
    justlzp
    wrote on last edited by justlzp
    #1

    Re: Memory Leak on QNetworkAccessManager

    baceuse QNetworkAccessManager::clearAccessCache close QNetworkAccessManager`s thread,call this func can clear cache memery, but all runnning qnetworkreply may lost;

    in QNetworkAccessManagerprivate :
    // this cache can be used by individual backends to cache e.g. their TCP connections to a server
    // and use the connections for multiple requests.
    QNetworkAccessCache objectCache;
    objectCache not thread safe

    so for async new QNetworkAccessManager to every qnetworkrequest. one to one may solve the problem.

    jsulmJ 1 Reply Last reply
    0
    • J justlzp

      Re: Memory Leak on QNetworkAccessManager

      baceuse QNetworkAccessManager::clearAccessCache close QNetworkAccessManager`s thread,call this func can clear cache memery, but all runnning qnetworkreply may lost;

      in QNetworkAccessManagerprivate :
      // this cache can be used by individual backends to cache e.g. their TCP connections to a server
      // and use the connections for multiple requests.
      QNetworkAccessCache objectCache;
      objectCache not thread safe

      so for async new QNetworkAccessManager to every qnetworkrequest. one to one may solve the problem.

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

      @justlzp Not sure there is a question in your post?

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

      SGaistS 1 Reply Last reply
      0
      • jsulmJ jsulm

        @justlzp Not sure there is a question in your post?

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @jsulm based on the link, I think this was an answer to an old question.

        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