BUG: externalHeatFluxSource: memory leak in addSup
Summary
The following in void Foam::fa::externalHeatFluxSource::addSup
is not deallocated:
auto tQ = new areaScalarField
(
io,
regionMesh(),
dimensionedScalar("q", dimPower/sqr(dimLength), 0),
zeroGradientFaPatchScalarField::typeName
);
areaScalarField& Q = *tQ;
Steps to reproduce
Memory analysis on buoyantPimpleFoam
with heatTransfer/buoyantPimpleFoam/hotRoomWithThermalShell
.
Relevant logs and/or images
==14377== LEAK SUMMARY:
==14377== definitely lost: 4,408 bytes in 40 blocks
==14377== indirectly lost: 179,592 bytes in 400 blocks
==14377== possibly lost: 0 bytes in 0 blocks
==14377== still reachable: 0 bytes in 0 blocks
==14377== suppressed: 0 bytes in 0 blocks
==14377==
==14377== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)