Closed abarret closed 1 year ago
No. We only want to deallocate data if we were responsible for allocating it. At the beginning of the function we have:
bool scr_is_allocated = d_adv_diff_hier_integrator->isAllocatedPatchData(thn_scr_idx);
if (!scr_is_allocated) d_adv_diff_hier_integrator->allocatePatchData(thn_scr_idx, data_time);
Ah, I get it now. I was looking at it in a different way.
@abarret I approved and merged this PR. But on second thought, shouldn't the line be:
if (scr_is_allocated) d_adv_diff_hier_integrator->deallocatePatchData(thn_scr_idx)
instead of using(!scr_is_allocated)
?