Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2456

Shared pointer lifetime is too short

    XMLWordPrintable

Details

    Description

      In code like this, it seems temporaries are dropped too early:

      TestSbk.getInstance().getNewPointer().getValue()
      

      And it results in an error:

      Object created: 0x55b05aacc210
      Traceback (most recent call last):
        File "/home/user/test/TestCascading.py", line 3, in <module>
          TestSbk.getInstance().getNewPointer().getValue()
      RuntimeError: Internal C++ object (TestSbkC_py.TestSbk) already deleted.
      Object destroyed: 0x55b05aacc210
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes