Le mercredi 26 septembre 2007 à 12:05 +0200, Loïc Molinari a écrit :
> Hi,
> 
> On Sat, 2007-09-22 at 17:50 +0200, Thomas Vander Stichele wrote:
> > I was trying to figure out why Elisa cannot open my folder of albums,
> > since it runs out of file descriptors.
> > 
> > It seems that all pigment images in the poblenou theme are being set
> > with set_image_from_fd
> 
> True.
> 

I think these fds are leaked on the Python side. Code sample
poblenou_frontend/node_view.py:214

widget.set_from_fd(os.open(thumbnail, os.O_RDONLY))

Can that be one reason of the leaks? file descriptor obtained from
os.open() is never closed in that case, AFAIK.

Grepping the code I see many calls like this one, with some variants
using open() builtin python function.

It'd be cool to clean these calls so that we have something like:

fd = os.open(...)
widget.set_from_fd(fd)
os.close(fd)


Philippe

Reply via email to