fix(memory leak): IndexedPack too large to live inside a qlist without pointers ()

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-05-26 19:21:07 -07:00
parent e61d8e4dc8
commit aae892dfd1
7 changed files with 28 additions and 24 deletions

View File

@ -123,7 +123,7 @@ class ResourceModel : public QAbstractListModel {
QSet<QUrl> m_currently_running_icon_actions;
QSet<QUrl> m_failed_icon_actions;
QList<ModPlatform::IndexedPack> m_packs;
QList<ModPlatform::IndexedPack::Ptr> m_packs;
// HACK: We need this to prevent callbacks from calling the model after it has already been deleted.
// This leaks a tiny bit of memory per time the user has opened a resource dialog. How to make this better?