flying-circus / pyfilesystem

Automatically exported from code.google.com/p/pyfilesystem
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Garbage Collection of FileWrapper #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
fs.filelike.FileWrapper seems to have a garbage collection issue due to a 
circular reference together with a __del__ method. See attached script for a 
test. It will require the fs.ini file in the working directory. I have also 
attached a reference graph created by the objgraph module.

Original issue reported on code.google.com by benklos...@gmail.com on 9 Sep 2011 at 10:51

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, attached the wrong graph file

Original comment by benklos...@gmail.com on 9 Sep 2011 at 10:54

Attachments:

GoogleCodeExporter commented 9 years ago
I think that's a bit of a hack used by the opener system (in opener.open), and 
not a problem with FileWrapper per se.

I'll think about a workaround...

Original comment by willmcgugan on 9 Sep 2011 at 11:09

GoogleCodeExporter commented 9 years ago
Checked in a fix to trunk which seems to solve this. No nodes in the 
reference_graph.png

Original comment by willmcgugan on 10 Sep 2011 at 9:17