Fixed some of the memory leaks and Clang warnings.

DrMemory and Valgrind work with regular debug builds.
This commit is contained in:
Muzychenko Andrey
2021-09-14 15:33:18 +03:00
parent 28e2417ef9
commit c5b7c0ad16
25 changed files with 74 additions and 97 deletions

View File

@@ -36,13 +36,10 @@ bool pb::FullTiltMode = false;
int pb::init()
{
float projMat[12], zMin = 0, zScaler = 0;
char datFileName[300];
char dataFilePath[300];
++memory::critical_allocation;
strncpy(datFileName, winmain::DatFileName, sizeof datFileName);
pinball::make_path_name(dataFilePath, datFileName, 300);
record_table = partman::load_records(dataFilePath, fullscrn::GetResolution(), FullTiltMode);
auto dataFilePath = pinball::make_path_name(winmain::DatFileName);
record_table = partman::load_records(dataFilePath.c_str(), fullscrn::GetResolution(), FullTiltMode);
auto useBmpFont = 0;
pinball::get_rc_int(158, &useBmpFont);