-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
animate_frames() iterates through the frames produced by frames_spatial() and writes them incrementally to a temporary directory. The PNG graphics device is only closed at the conclusion of the loop, after all frames are rendered:
Lines 113 to 119 in cf88cdc
| file <- file.path(frames_dir, "frame_%05d.png") | |
| grDevices::png(file, width = width, height = height, res = res) | |
| graphics::par(ask = FALSE) | |
| .lapply(1:length(frames), function(i){ | |
| quiet(print(frames[[i]])) | |
| }, moveVis.n_cores = 1) | |
| grDevices::dev.off() |
It seems that each rendered frame persists in memory until the device is turned off and for large animations can exhaust the available memory. Fixing this may be as simple as moving the graphics rendering code inside the loop.
Metadata
Metadata
Assignees
Labels
No labels