summaryrefslogtreecommitdiffstats
path: root/header.MIT
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-05-08 16:23:17 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-05-12 12:52:52 +0200
commit6a90078d6bfe7900b6c9a6ea8c758172c7bc241f (patch)
treed8078dae34c8e308133b602b7b085c518f1c7aff /header.MIT
parent973f840e323e5405cbf166de085743c9c8dc59dd (diff)
Fix potential memory leak by adding a virtual destructor to AnchorVertex
The subclass AnchorVertexPair is allocated and passed around as pointers to AnchorVertex, and placed in lists that are then later cleaned up via qDeleteAll. This very likely results in memory leaks, as the compiler- generated ~AnchorVertexPair destructor is never called. Add a virtual destructor. Since there now is a vtable generated for AnchorVertex, remove the m_type member (which is only used for string generation in debug builds) and make toString virtual instead. Change-Id: I2cf184c0b1da1bd59b056a0f696a0e5479d4cb4e Fixes: QTBUG-84094 Coverity-Id: 218707 Pick-to: 5.15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'header.MIT')
0 files changed, 0 insertions, 0 deletions