Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6366

[Regression] C++ object is not garbage-collected if a connection has been made from a script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 4.6.1
    • 4.6.0
    • Qt Script
    • None
    • 132eccca92a90e4d67ba8b5a4052384a2b2cfdf9

      The attached program behaves differently with Qt 4.6 than with 4.5. With 4.5, when the reference to the script object is removed (by setting it to null), the C++ object is deleted in the subsequent garbage collection. With 4.6, the object is not deleted.
      The only workaround is to explicitly disconnect from the signal in the script before setting the reference to null.

        1. main.cpp
          0.5 kB
          Kent Hansen
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kenthans Kent Hansen (Inactive)
            kenthans Kent Hansen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes