[Zope] Understanding LeakFinder output

Marco Bizzarri marco.bizzarri at gmail.com
Sat Mar 24 11:36:40 EDT 2007


Hi all.

I'm using LeakFinder product in order to hunt some memory leaks in my
application. Before I can do that, however, I need support in order to
understand the output of LeakFinder itself.

I'm posting here a snippet of example code I'm using to understand.

    def createInterface(self, interface_id, *p, **kw):
        if "test_folder_XXX" in self.objectIds():
            test_folder_XXX = getattr(self, "test_folder_XXX")
            self._delObject("test_folder_XXX")
            del test_folder_XXX
        self.manage_addFolder("test_folder_XXX")

The snippet is silly, but I'm using it to test.

Now, I run Zope (2.7.8), and run 1000 invocations of this code from an
external client (using urlopen).

Then, I take a look at LeakFinder:

                                   Class  	References  	Change from
reference sample
 Persistence.PersistentMapping  	3559  	0
OFS.Folder.Folder 	1817 	0

Now, according to what I can understand, there are 1817 references.
This is strange to me, since I've removed the folder object, and then
I've actually deleted the object. Of course, there is something which
is not clear to me. I would be grateful if someone can clarify the
subject.

Regards
Marco
-- 
Marco Bizzarri
http://iliveinpisa.blogspot.com/


More information about the Zope mailing list