diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-21 13:51:03 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-06 10:00:39 -0800 |
commit | 122092707c608e930fbade660be2cb3f7a9c1946 (patch) | |
tree | 69dd3bdc73b98f2a2a9142208f9062223bab49a1 /CODINGSTYLE.md | |
parent | 805a2388aff52ff900c9311b444d6dc127b3c54f (diff) | |
download | subsurface-122092707c608e930fbade660be2cb3f7a9c1946.tar.gz |
statistics: delete chart items when root node is deleted
When reparenting the statistics widget, QtQuick deletes
the rootNode and all the child nodes. It is unclear whether
this is a bug or intended behavior. In any case, it means
that the pointers to QSG nodes in the chart items become
stale.
To avoid this, delete all chart items in the root node's
destructor, before QtQuick can do anything. It is unclear
from which context this is called (render or UI) and whether
this is even valid. In some tests, it seemed to work.
The difficulty is that all the stale pointers to chart items
have to be deleted as well. All in all, the QSG memory
management is a big nuisance and very brittle.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'CODINGSTYLE.md')
0 files changed, 0 insertions, 0 deletions