Closed gdunstone closed 8 years ago
Thank you! I think it was doing a copy before as well, so this is definitely an improvement :-)
I think the only way around this would be to make the File
class more file-like with a close
method that frees the memory.
I'll look into making it a context manager today. It still leaks about ~200kb per large fine jpeg from a d70, but it's not as urgent for me (I just set up a systemd service with restart=always).
On 18 Aug 2016, at 03:04, Johannes Baiter notifications@github.com wrote:
Thank you! I think it was doing a copy before as well, so this is definitely an improvement :-) I think the only way around this would be to make the File class more file-like with a close method that frees the memory.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I noticed that I couldnt capture more than 10 pictures with a raspberry pi. It leaks memory. I think I fixed most of it up but I'm not 100% sure. I also switched from returning a buffer to copying the contents to bytes and returning that, because otherwise I couldnt free the CameraFile.