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

Clean up QFontEngine reference counting logic in QStaticText and TextMaskMaterial

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • 5.0.0
    • 5.0.0
    • Quick: SceneGraph
    • None

      These two code paths were altered so they never delete the font engines, as the QFontCache will handle the garbage collection later.

      While this won't cause leaks in practice, it's different from how the references are handled in other locations in Qt, where the QFontEngine will be deleted when the reference count hits 0 if it is not present in a cache. If we don't use the same logic in QtSceneGraph, we leave ourselves open for bugs in the future, if someone decides to rely on the implicit contract.

      We should fix this by checking cache_count when there are no more references and delete the object if it is also zero.

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

            esabraha Eskil Abrahamsen Blomfeldt
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes