Fix java checker crash, some memory leaks
This commit is contained in:
parent
7cb76788bd
commit
e1e1d99102
@ -35,7 +35,7 @@ BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
|
||||
: QObject(parent), inst_d(d_in)
|
||||
{
|
||||
I_D(BaseInstance);
|
||||
d->m_settings = settings_obj;
|
||||
d->m_settings = std::shared_ptr<SettingsObject>(settings_obj);
|
||||
d->m_rootDir = rootDir;
|
||||
|
||||
settings().registerSetting("name", "Unnamed Instance");
|
||||
|
@ -28,6 +28,6 @@ struct BaseInstancePrivate
|
||||
{
|
||||
QString m_rootDir;
|
||||
QString m_group;
|
||||
SettingsObject *m_settings;
|
||||
std::shared_ptr<SettingsObject> m_settings;
|
||||
QSet<BaseInstance::InstanceFlag> m_flags;
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ void JavaVersionList::sort()
|
||||
// NO-OP for now
|
||||
}
|
||||
|
||||
JavaListLoadTask::JavaListLoadTask(JavaVersionList *vlist)
|
||||
JavaListLoadTask::JavaListLoadTask(JavaVersionList *vlist) : Task()
|
||||
{
|
||||
m_list = vlist;
|
||||
m_currentRecommended = NULL;
|
||||
@ -207,7 +207,6 @@ void JavaListLoadTask::checkerProgress(int current, int total)
|
||||
void JavaListLoadTask::javaCheckerFinished(QList<JavaCheckResult> results)
|
||||
{
|
||||
QList<JavaVersionPtr> candidates;
|
||||
m_job.reset();
|
||||
|
||||
QLOG_DEBUG() << "Found the following valid Java installations:";
|
||||
for(JavaCheckResult result : results)
|
||||
@ -226,14 +225,14 @@ void JavaListLoadTask::javaCheckerFinished(QList<JavaCheckResult> results)
|
||||
}
|
||||
|
||||
QList<BaseVersionPtr> javas_bvp;
|
||||
for (auto &java : candidates)
|
||||
for (auto java : candidates)
|
||||
{
|
||||
//QLOG_INFO() << java->id << java->arch << " at " << java->path;
|
||||
BaseVersionPtr bp_java = std::dynamic_pointer_cast<BaseVersion>(java);
|
||||
|
||||
if (bp_java)
|
||||
{
|
||||
javas_bvp.append(bp_java);
|
||||
javas_bvp.append(java);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,9 @@ if [ "x$DEPS_LIST" = "x" ]; then
|
||||
# Run MultiMC
|
||||
"${MMC_DIR}/bin/MultiMC" -d "${MMC_DIR}" $@
|
||||
|
||||
# Run MultiMC in valgrind
|
||||
# valgrind --log-file="valgrind.log" --leak-check=full --track-origins=yes "${MMC_DIR}/bin/MultiMC" -d "${MMC_DIR}" $@
|
||||
|
||||
# Exit with MultiMC's exit code.
|
||||
exit $?
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user