So I have written a python script that generates a big plane with like 36000 vertices and moves each vertex’s z position and vertex paint color based on the Mandelbrot fractal set. It then renders the scene deletes the plan and interates the fractal sets zooming variable. This creates images that ‘zoom’ in on the fractal when viewed in order.
The problem is that this loop can only run 20 times before I get a fatal “Malloc returns null” error. I have done my research and I know that Blender has run out of memory and that, evidently, previously used plans were not deleted, which would free up memory, but instead ‘unlinked’ from the scene to be kept for other uses like the undo feature.
One remedy is to save the blend file and reopen it, but if I am going to run the loop 1000 times that is not very practical.
Is there a way to clear all data, free up memory and continue the loop? Any other remedies?