[Zope-dev] Zope Head (2.8) breaks "refresh"

Jeremy Hylton jeremy at zope.com
Mon Dec 8 15:28:54 EST 2003


On Mon, 2003-12-08 at 13:17, Dieter Maurer wrote:
> Jeremy Hylton wrote at 2003-12-7 23:01 -0500:
> >On Sun, 2003-12-07 at 08:15, Dieter Maurer wrote:
> >>   ATT: replacing the cache without clearing it can lead to huge
> >>   memory leaks (everything in the old cache is leaked!).
> >
> >Without commenting on the rest of the bug report, I should mention that
> >caches and persistent objects all participate in cyclic GC.  They will
> >not leak the way pre-2.8 caches did.
> 
> Has the "do not free when a cycle contains an object with destructor"
> restriction been removed from the cyclic GC?
> 
> It is not unlikely that the cache references an object with a "__del__".
> This may keep the cache and all its content.

I don't think it makes a lot of sense to put an __del__ method on a
Persistent object.  When would you expect it to be called?  Every time
the object is turned into a ghost?  When the object is removed by pack? 
I can imagine some people would try to migrate non-persistent code to
ZODB and have to deal with __del__ then.  If I were doing that, I'd make
sure to check gc.garbage when I tested and fix any code that caused
leaks.

Jeremy





More information about the Zope-Dev mailing list