From 6dc398f36d48c25ef2bf78e00cb337ecab205227 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Mon, 2 Nov 2009 22:47:18 -0800 Subject: Changed to delete the whole dict and added note about similar leak in sample xmp.py so it appears to be in the fuse bindings diff --git a/FuseArchive/ChunkFile.py b/FuseArchive/ChunkFile.py index c33ae73..8e4f2eb 100644 --- a/FuseArchive/ChunkFile.py +++ b/FuseArchive/ChunkFile.py @@ -407,10 +407,17 @@ class ChunkFile(object): # There is some kind of mem leak, ChunkFile objects end up in a # tuple of [obj,True] for every object written and never get freed, - # maybe a fuse bug? - del self.chunks - del self.chunk - del self.original_chunks + # maybe a fuse bug? Just trying to minimize the damage here by + # freeing the big chunks of memory. + # + # Note that you can see this same problem in xmp.py, if you run it + # in pdb then use objgraph to see the top objects XmpFile will be + # near the top with this odd reference in a tuple that is owned by + # nothing + #del self.chunks + #del self.chunk + #del self.original_chunks + self.__dict__ = {} def _fflush(self): if self.wr and self.modified: -- cgit v0.10.2