How to prevent memory build-up?

Replacing SVectors by MVectors has helped for memory consumption. Thanks for this advice.

However, I found the real problem. I am using the module WriteVTK to write vtk outputs. It turns out that when using compressed vtk outputs, it creates memory build-up. I don’t know why, but this will have to be reported to the developers of this package.

Thank you all for your much appreciate help.