clementfarabet / lua---ffmpeg

An interface between ffmpeg and Lua/Torch
21 stars 17 forks source link

Possible memory leak #12

Open daoudChami opened 8 years ago

daoudChami commented 8 years ago

Hello,

It seems that after a few calls on ffmpeg.Video with the load parameter set to true, the memory used by the previous video is not freed even though the same object is used to recieve the return value of ffmpeg.Video.

Regards

EDIT : The memory leak is confirmed. Its due to image:load. Lua gc cant free tensors created by image:load... https://groups.google.com/forum/#!topic/torch7/mWcQjP2WEVQ

soumith commented 8 years ago

that thread is old news. we now have heap tracking for tensors, that automatically triggers the GC after certain memory thresholds. can you upgrade your torch / cutorch and reconfirm.

daoudChami commented 8 years ago

Thank you for your reply.

Regards

2016-02-08 16:57 GMT+01:00 Soumith Chintala notifications@github.com:

that thread is old news. we now have heap tracking for tensors, that automatically triggers the GC after certain memory thresholds. can you upgrade your torch / cutorch and reconfirm.

— Reply to this email directly or view it on GitHub https://github.com/clementfarabet/lua---ffmpeg/issues/12#issuecomment-181418827 .

Charlie-Steiner commented 8 years ago

The memory used can still get pretty outrageous if converting a few hundred videos, but only if you don't call garbage collect manually. Maybe ffmpeg should call garbagecollect somewhere?