Re: [pygtk] File doesn't get closed: how to make sure that the object is 'freed'?

2009-03-15 Thread Arjen Nienhuis
> Try running: > >import gc >gc.collect() > > after you've removed all references to "doc". Hi, Thanks. I have this now. It still breaks. Only slower. gc.collect() is slow. === import os import poppler import gc for i in range(100): print i uri = "f

Re: [pygtk] File doesn't get closed: how to make sure that the object is 'freed'?

2009-03-15 Thread Tim Evans
Arjen Nienhuis wrote: > Hi, > > I'm using the glib bindings of poppler through python. Everything works fine: > > - I can open a pdf file > - I can render it through pycairo > > but after that the file stays open. For each use of > 'document_new_from_file' one extra file descriptor is used (acco

Re: [pygtk] File doesn't get closed: how to make sure that the object is 'freed'?

2009-03-15 Thread Stefan Stuhr
søn, 15 03 2009 kl. 23:38 +0100, skrev Arjen Nienhuis: > Hi, > > I'm using the glib bindings of poppler through python. Everything works fine: > > - I can open a pdf file > - I can render it through pycairo > > but after that the file stays open. For each use of > 'document_new_from_file' one ex

[pygtk] File doesn't get closed: how to make sure that the object is 'freed'?

2009-03-15 Thread Arjen Nienhuis
Hi, I'm using the glib bindings of poppler through python. Everything works fine: - I can open a pdf file - I can render it through pycairo but after that the file stays open. For each use of 'document_new_from_file' one extra file descriptor is used (according to lsof). If I leave the program r