Memory leak when using runtime fieldExpression::grad(U) with cached grad(U)
This issue can be reproduced by running any tutorial where grad(U) is both cached in system/fvSolution (for example interFoam/RAS/DTChull) and computed using the fieldExpression:
test { functionObjectLibs ("libfieldFunctionObjects.so"); type grad; field U; outputControl writeTime; }
The issue is likely related to line 42 and 51 in src/functionObjects/field/grad/gradTemplates.C