ScriptInterpreter cache for domobjects (dangerous change?)

David Faure dfaure@klaralvdalens-datakonsult.se
Thu, 9 Jan 2003 18:56:21 +0100


=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm looking at the safari changes in khtml/ecma.

> - Added code to deal with DOM objects to make sure they keep the same
> wrapper for the lifetime of the document and don't leak when the
> document goes away.

=2D -DOMNode::~DOMNode()
=2D -{
=2D -  ScriptInterpreter::forgetDOMObject(node.handle());
=2D -}

I understand that when destructing the whole document it's faster if we can
also clear the relevant cache all at once instead of node by node ....
but what happens in the case where a single node (e.g. element) is
being destroyed? Won't the removal of the above call mean that the cache
will hold a dangling pointer?

=2D --=20
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Klar=E4lvdalens Datakonsult AB, Platform-independent software solutions
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+HbfF72KcVAmwbhARAk2QAJ928fUDfe0mI9ISxjxlr1HDQ/xWggCfVDrS
wQVlTpPJgcYrzTBEdTu2UAY=3D
=3DEoAu
=2D----END PGP SIGNATURE-----