- From: Alfie Kirkpatrick <akirkpatrick@ims-global.com>
- Date: Mon, 11 May 1998 10:15:44 +0000
- To: www-dom@w3.org, donpark@quake.net
Sorry to jump in on this one. The case for COM is actually very simple. Normally, when returning an object, the reference count is increased and it is up to the calling function to decrement it when its finished with the object. In the case of Node.removeChild, the reference count would just be left alone, so that when the calling function was finished with it, it would decrement the reference count to zero and the Node would be deleted. I found memory management to be one of the simpler things when implementing the previous DOM draft in COM, provided you are careful and follow the rules with AddRef and Release... Would it not be possible for a Java implementation to mimic this COM behaviour to get around the "GC problem". I don't understand the Java case too well, so maybe this isn't an option. I suppose what you (Don) are asking for is exactly this, written into the spec. However, it might actually cause confusion in a COM implementation (DOM release on top of the COM release!) Alfie. ---------- From: donpark@quake.net Sent: 08 May 1998 11:41 To: www-dom@w3.org Subject: Re: NodeIterators & Java implementation -------------------------------------------------------------------------- -- 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 Monday, 11 May 1998 05:29:36 UTC