raspberrypi / picamera2

New libcamera based python library
BSD 2-Clause "Simplified" License
891 stars 188 forks source link

Fix DmaAllocator memory leak when closing camera #888

Closed will-v-pi closed 11 months ago

will-v-pi commented 11 months ago

When closing the camera, the allocator was not closing the open file descriptors, causing a memory leak. Fixed by closing the file descriptors and deleting the allocator when closing the camera.

Fixes #887

davidplowman commented 11 months ago

Looks like it's just timing out. We could either increase the timeout, or shorten the new test a bit!

will-v-pi commented 11 months ago

Probably better to shorten the test - I'll see if configuring a larger config can make the leak occur sooner