fix(memory leak): don't override default deconstructor + reset shared_ptr + ensure modal get's cleaned up
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
aae892dfd1
commit
ff03dd22fe
@ -41,8 +41,6 @@ class ModPage : public ResourcePage {
|
||||
return page;
|
||||
}
|
||||
|
||||
~ModPage() override = default;
|
||||
|
||||
//: The plural version of 'mod'
|
||||
[[nodiscard]] inline QString resourcesString() const override { return tr("mods"); }
|
||||
//: The singular version of 'mods'
|
||||
|
@ -230,7 +230,7 @@ void ResourceModel::clearData()
|
||||
|
||||
void ResourceModel::runSearchJob(Task::Ptr ptr)
|
||||
{
|
||||
m_current_search_job = ptr;
|
||||
m_current_search_job.reset(ptr); // clean up first
|
||||
m_current_search_job->start();
|
||||
}
|
||||
void ResourceModel::runInfoJob(Task::Ptr ptr)
|
||||
|
@ -31,8 +31,6 @@ class ResourcePackResourcePage : public ResourcePage {
|
||||
return page;
|
||||
}
|
||||
|
||||
~ResourcePackResourcePage() override = default;
|
||||
|
||||
//: The plural version of 'resource pack'
|
||||
[[nodiscard]] inline QString resourcesString() const override { return tr("resource packs"); }
|
||||
//: The singular version of 'resource packs'
|
||||
|
@ -83,6 +83,8 @@ ResourcePage::ResourcePage(ResourceDownloadDialog* parent, BaseInstance& base_in
|
||||
ResourcePage::~ResourcePage()
|
||||
{
|
||||
delete m_ui;
|
||||
if (m_model)
|
||||
delete m_model;
|
||||
}
|
||||
|
||||
void ResourcePage::retranslate()
|
||||
|
@ -31,8 +31,6 @@ class ShaderPackResourcePage : public ResourcePage {
|
||||
return page;
|
||||
}
|
||||
|
||||
~ShaderPackResourcePage() override = default;
|
||||
|
||||
//: The plural version of 'shader pack'
|
||||
[[nodiscard]] inline QString resourcesString() const override { return tr("shader packs"); }
|
||||
//: The singular version of 'shader packs'
|
||||
|
Loading…
Reference in New Issue
Block a user