Fix minor cleanup bugs in the Resmed regression tests that were causing crashes.

This commit is contained in:
sawinglogz 2020-02-03 11:43:13 -05:00
parent ef26ab5e46
commit cdeba58c5d
2 changed files with 8 additions and 9 deletions

View File

@ -94,14 +94,6 @@ Profile::~Profile()
removeLock();
}
delete user;
delete doctor;
delete cpap;
delete oxi;
delete appearance;
delete session;
delete general;
// delete machine objects...
for (auto & mach : m_machlist) {
delete mach;
@ -111,6 +103,13 @@ Profile::~Profile()
delete day;
}
delete user;
delete doctor;
delete cpap;
delete oxi;
delete appearance;
delete session;
delete general;
}
bool Profile::Save(QString filename)

View File

@ -30,9 +30,9 @@ void ResmedTests::initTestCase(void)
void ResmedTests::cleanupTestCase(void)
{
delete AppSetting;
delete p_pref;
delete p_profile;
p_profile = nullptr;
delete p_pref;
}