[Zope] Posible memory leak?
Dylan Reinhardt
zope at dylanreinhardt.com
Sun Nov 30 23:01:22 EST 2003
On Sun, 2003-11-30 at 15:01, Dieter Maurer wrote:
> Dylan Reinhardt wrote at 2003-11-29 08:36 -0800:
> > On Fri, 2003-11-28 at 20:33, Gabriel Genellina wrote:
> > ...
> > If you *do* store
> > persistent objects within persistent objects, you'll typically save a
> > new copy of the parent object each time a change is made to one of the
> > children.
>
> You mean: when you do store *NON*-persistent objects within persistent
> objects, then ...
I meant what I said, but it's quite possible I was wrong. :-)
>
> Otherwise, any change in your Zope hierarchy would write the complete
> hierarchy (which, of course, is not the case) as "ObjectManager"
> (a persistent object) does store its content items (again
> persistent objects) as attributes.
But isn't that *exactly* the problem you face if you do this in a
non-ObjectManager object? Any change to any part of the object
necessitates saving a copy of the *whole* object.
I'm under the distinct impression that ObjectManager is special in this
regard and that's why it's the recommended solution for storing any
non-trivial number of persistent objects. I'd greatly appreciate a
correction if I've misunderstood something about that.
Dylan
More information about the Zope
mailing list