1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-05-19 06:47:44 +00:00

Free map terrain and bg models once we load them

Unlike the Gear Editor, we don't need these later (for export and such -
yet!) and can be safely removed. This significantly reduces the memory
pressure from loading maps, but it's not all sunshine and rainbows yet.
This commit is contained in:
Joshua Goins 2025-05-17 09:48:33 -04:00
parent 695ec80635
commit 79cf04942e
2 changed files with 11 additions and 1 deletions

View file

@ -80,7 +80,12 @@ MapView::MapView(GameData *data, FileCache &cache, AppState *appState, QWidget *
QString::fromStdString(assetPath),
materials,
0);
// We don't need this, and it will just take up memory
physis_mdl_free(&plateMdl);
}
physis_free_file(&plateMdlFile);
}
} break;
}
@ -119,6 +124,11 @@ void MapView::addTerrain(QString basePath, physis_Terrain terrain)
QStringLiteral("terapart%1").arg(i),
materials,
0);
// We don't need this, and it will just take up memory
physis_mdl_free(&plateMdl);
physis_free_file(&plateMdlFile);
}
}
}

2
extern/libphysis vendored

@ -1 +1 @@
Subproject commit 5a1cf87fb9a04ed8ccfbd635564eaf26654fc0a5
Subproject commit 4a1332b6199c5146730a31ceab9f3ae2c7ecc7f1