Re: NodeIterators & Java implementation

We expect that the DOM will be used in the context of various languages and
object system, each which might have its own mechanism for memory management.
Any specific binding of the DOM should be able to specify its own memory
management primitives. COM, for example, has its own notion of reference
counting, including AddRef() and Release() methods in the base IUnknown
interface. JavaScript is a garbage collected language. In both cases, an
explicit "release" method specified by the DOM would be redundant and
unnecessary. Since memory management is so object system specific, I strongly
believe that the DOM should not mandate its own primitives.

--Vidur

Don Park wrote:
> 
> One topic that is missing from the spec is how to free/delete/release
> objects obtained through DOM.  For example, what should one do with Node
> returned by Node.removeChild?  Document interface has methods for creating
> objects but nothing to delete them.  Are we do assume that language specific
> facilities are to be used?  Do we use 'delete' operator or 'free()' under
> C++?  What about CORBA and COM-based implementations?  One does not just
> 'delete' under COM.
> 
> Also how do we know which objects should be deleted and which one should not
> be?  What is wrong is designating 'release' on Node as well as iterators as
> Java specific delete facility?  For that matter, why not move it all the way
> up so everyone can standardize on the delete facility?  It would certain
> remove a lot of headaches.  If one is smart enough to invoke getNodeChilds,
> why is requiring invokation of release() too much?
> 
> Don Park
> http://www.docuverse.com/personal/index.html

Received on Thursday, 7 May 1998 14:55:25 UTC