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

Fix QSharedPointer implementation

    XMLWordPrintable

Details

    Description

      QSharedPointer does not work in all cases with forward-declared pointers. It needs access to the full declaration at every point where the last reference could be dropped. That is to say, at every point where any reference could be dropped.

      The following code, for example, might be undefined behaviour:

          class Foo;
          QSharedPointer<Foo> ptr = getFooSharedPointer();
          ptr.clear();
      

      QSharedPointer should record the deleter function from the point where the pointer was constructed.

      Attachments

        For Gerrit Dashboard: QTBUG-25819
        # Subject Branch Project Status CR V

        Activity

          People

            thiago Thiago Macieira
            thiago Thiago Macieira
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes