jbaiter / gphoto2-cffi

Python bindings for libgphoto2 with an idiomatic API
GNU Lesser General Public License v3.0
37 stars 16 forks source link

26.memory leaks #27

Closed define-private-public closed 7 years ago

define-private-public commented 7 years ago

this does solve the memory leaks for capture() completely, that's been a little difficult to track down the full culprit, but this does improve them just a tiny bit. I suspect something might be happening with the ffi.cast() calls as well. There could also be something in CFFI itself too.

I also included fixes for get_preview(). I removed it's @exit_after decorator and added a new exit() method that the programmer can call instead to get out of the preview mode.

Version number was also bumped to 0.4.2

define-private-public commented 7 years ago

I forgot to move the gp_file_new() method to the constructor. It was unfortunately also causing some leaks. Well, that's fixed now and things should be fine.

Sorry I didn't catch that until now...

Whoops.