Skip to content

fix memory leak in CDI reader

Florian Ziemen requested to merge florian.ziemen/paraview:memleak-fix into master

Fixes issue #20343

The ModConnections array gets allocated at every time step.

Now we keep track of the size and only delete and allocate on size changes.

This is more of a quick fix. In principle, this code should not be reached on a per-timestep basis, but sorting out when exactly it should (not) be reached will require more effort, and even then this check seems sensible. Another alternative for the tracking would be the use of a vector instead of the array (pointer).

Merge request reports