Skip to content
Prev 398126 / 398521 Next

Processing repeated images and memory recovery by GC

On 05-09-2025 01:24, Jeff Newmiller via R-help wrote:

            
And often writing such a minimal example helps in pinpointing the issue 
quite often leading to a solution.

You could start by stripping down your current code. Remove all plotting 
commands: does the problem still exist then it is probably in reading or 
cleaning up the image rasters. Is it just for png's or for all image 
formats? Etc. Another way is 'bottom up': write a script that reads 
images and does nothing with them; does the problem happen there? Then 
start adding stuff until the issue occurs again.

Could it be that you keep opening up new graphics devices without 
closing them? Also split.screen creates a kind of devices that should be 
closed.

HTHT,
Jan