Skip to content
Prev 61269 / 63421 Next

memory leak in png()

On 17/01/2023 13:06, Duncan Murdoch wrote:
Duncan - Not that I'm seeing

Rdevel -d valgrind --vanilla -e " for (i in 1:1) {png(filename='p.png'); 
plot(1:10); dev.off()}"

==63291== LEAK SUMMARY:
==63291==    definitely lost: 2,560 bytes in 4 blocks
==63291==    indirectly lost: 17,710 bytes in 762 blocks
==63291==      possibly lost: 1,820 bytes in 8 blocks
==63291==    still reachable: 52,177,408 bytes in 21,282 blocks
==63291==                       of which reachable via heuristic:
==63291==                         newarray           : 4,264 bytes in 1 
blocks
==63291==         suppressed: 0 bytes in 0 blocks

Rdevel -d valgrind --vanilla -e " for (i in 1:100) 
{png(filename='p.png'); plot(1:10); dev.off()}"

==63464== LEAK SUMMARY:
==63464==    definitely lost: 2,560 bytes in 4 blocks
==63464==    indirectly lost: 17,710 bytes in 762 blocks
==63464==      possibly lost: 1,820 bytes in 8 blocks
==63464==    still reachable: 56,072,939 bytes in 19,283 blocks
==63464==                       of which reachable via heuristic:
==63464==                         newarray           : 4,264 bytes in 1 
blocks
==63464==         suppressed: 0 bytes in 0 blocks

Tim