covid-sim icon indicating copy to clipboard operation
covid-sim copied to clipboard

Memory leak in SetupModel.cpp

Open WeiqunZhang opened this issue 4 years ago • 1 comments

In SetupModel.cpp (commit e698439cdfe3097f18492), there is a global variable void* BinFileBuf. There are three mallocs for it at lines 53, 666, and 795, but there is only one free for it at line 822 that frees the memory allocated at line 666. The memory allocated at the two other places are not freed.

WeiqunZhang avatar Apr 07 '20 17:04 WeiqunZhang

Thank you for your report. I agree there is an issue here.

We will investigate improving this, and making the memory flow more obvious.

matt-gretton-dann avatar Apr 09 '20 15:04 matt-gretton-dann