Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.2, 6.2.7
-
fc3eeb1a5 (dev), 97204ab73 (6.5), 891c45baa (tqtc/lts-6.2)
Description
When the source of Loader 3D{} continues to change m_srbCache continues to grow and there seems to be no mechanism to release it.
Is this the intended behavior?
QRhiShaderResourceBindings *QSSGRhiContext::srb(const QSSGRhiShaderResourceBindingList &bindings) { auto it = m_srbCache.constFind(bindings); if (it != m_srbCache.constEnd()) return *it; QRhiShaderResourceBindings *srb = m_rhi->newShaderResourceBindings(); srb->setBindings(bindings.v, bindings.v + bindings.p); if (srb->create()) { m_srbCache.insert(bindings, srb); } else { qWarning("Failed to build srb"); delete srb; srb = nullptr; } return srb; }
below is heaptrack (1.1.80) data when test quick3d_memory_leak_3.tar.gz
For more details, please see the attached raw heaptrack data.
- heaptrack.quick3d_memory_leak.6.2.7_teapot_mesh.zst.tar.gzaa
- heaptrack.quick3d_memory_leak.6.2.7_teapot_mesh.zst.tar.gzab
- heaptrack.quick3d_memory_leak.6.2.7_teapot_mesh.zst.tar.gzac
Even though we can release the SRB cache by using https://doc.qt.io/qt-5/qquickwindow.html#releaseResources after applying https://codereview.qt-project.org/c/qt/qtquick3d/+/436960
I don't think it's an appropriate use because it releases all graphic resources.
Attachments
Issue Links
- relates to
-
QTBUG-114110 QtQuick3d scene freeze when deleting many nodes
- Closed