>> objects = gc.get_objects()
>> objects2 = [obj for obj in objects if getattr(obj, '__class__', None)]
> (I'm a bit surprised that you get objects without a __class__ attribute
> -- could you elaborate about those?  Old-style class instances?
> Extension types?)

No, it's just a copy & paste of a old memory debugging thread, sorry

>> emails = [obj for obj in objects2 if 'mail' in 
>> obj.__class__.__name__.lower()]
> How many different classes are there with 'mail' in the (lowercased)
> class name?
> Do they all inherit from Persistent?

Just one class, it inherit from Persistent, yes.   Following other
classes results in the same problem

>> Following gc references, I see this mails are referenced from a
>> OOBucket, that is referenced by another OOBucket, ...
> I assume those mails are values rather than keys.

Yes, the keys are strings with the id's of the objects

> Your description would make perfect sense to me if your mail classes
> weren't subclasses of Persistent (and the fix would be: make them
> subclass Persistent).

No, all them inherit from CMF PortalContent, and this from Persistent,
so there is not the problem.

I'm using RelStorage, but this shouldn't affect.  I will try the same
tests in a FileStorage to be sure

Thanks for your help
Santi Camps (Earcon S.L.)
For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to