[4suite] Memory leaks not fixed in 4suite0.9rc1
Mike Olson
Mike.Olson at fourthought.com
Wed Sep 20 09:42:23 MDT 2000
Alexandre Fayolle wrote:
>
> Hi there,
>
> Some memory leaks I had mentionned over the past few weeks are
> still in RC1:
>
> * no call to ReleaseNode in StripHtml and StripXml in xml.dom.ext
> (reported on august 12)
I still don't see why this is needed. Both of the strips should only
remove text nodes. When the text node is removed from its parent, the
parent->child circular reference is broken, the text node should go
away. The only way I can see problems is when a non-text node is
removed. If this is the case then something else is broken.
>
> * reference leaks in Sax2.FromXmlStream (patch submitted on august 28)
Again, I don't see the cycle. Yes, the reader references the owner
document (and the root node, and the doctype, and any orphaned nodes),
but none of these nodes have references back to the reader. When the
reader is garbage collected, then the reference count of all of these
nodes goes down one. Do you keep one copy of a Sax2 reader in global
memory space?
Note, I tested memory pretty heavily before this release. I tried
oodles of use cases and I could not get any nodes to leak (as long as I
called ReleaseNode when I should). This included, Saxing, Sax2ing,
Striping, (remove|append|insertBefore|replace)Child calls, and printing.
Do you have specific code that leaks in one of these 2 cases. If so can
you send me a copy (off the list if you'd like). I promise not to re
sell it :)
Mike
>
> --
> Alexandre Fayolle
> http://www.logilab.com - "Mais o est donc Ornicar ?" -
> LOGILAB, Paris (France).
>
> _______________________________________________
> 4suite mailing list
> 4suite at lists.fourthought.com
> http://lists.fourthought.com/mailman/listinfo/4suite
--
Mike Olson Principal Consultant
mike.olson at fourthought.com (303)583-9900 x 102
Fourthought, Inc. http://Fourthought.com
Software-engineering, knowledge-management, XML, CORBA, Linux, Python
More information about the 4suite
mailing list