Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Engine not deleted by QDeclarativeView

    QML and Qt Quick
    2
    3
    2187
    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.
    • S
      SteveKing last edited by

      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 Reply Quote 0
      • A
        andre last edited by

        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 Reply Quote 0
        • S
          SteveKing last edited by

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