Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Engine not deleted by QDeclarativeView

Engine not deleted by QDeclarativeView

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.4k 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
    SteveKing
    wrote on last edited by
    #1

    Hi,

    Not sure if I'm missing something here, but when I run memory leak checks on my application it reports a huge number, most of which seem to be caused by the QDeclarativeView not deleting its QDeclarativeEngine. I'm using 4.7.2.

    To solve the problem I've sub-classed the View and am calling engine()->deleteLater(). As I haven't seen a report on this before I assume I'm doing something stupid here so any help would be appreciated.

    Thanks,
    Steve

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

      Well, if I check the source code, I do see that QDeclarativeView deletes the engine. See qdeclarativeview.cpp line 136 (version 4.7.3 in the desctructor of QDeclarativeViewPrivate).

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SteveKing
        wrote on last edited by
        #3

        Yep... which points that it's either my code or a false positive.

        I've just run the simple "Hello World" QML program through the tool (AQTime) and it also reports leaks so I guess I'll have to give Valgrind a go on a Linux box instead.

        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