- From: Mike Champion <mcc@arbortext.com>
- Date: Tue, 26 May 1998 22:42:00 -0400
- To: www-dom@w3.org
At 08:21 PM 5/26/98 -0400, Don Robertson wrote: >Is there any policy on object ownership for languages like C++ which do >not have native reference counting support, or are the objects expected >to be reference counted? I'm not sure if this is exactly what you're asking, but here's the semi-official, current (as far as I know) DOM position on memory management: >A. The DOM specification does not define any methods related to memory >management (such as to release an object). This is because while the DOM >is a programming language independent API, the way one deals with memory >is very language specific. Therefore any method related to memory >management, that is required by a particular language, needs to be >specified in that language binding. Due to the way memory is managed in >Java and ECMAScript, none of the bindings included in the DOM >specification have such methods. By extension to the question of object ownership, this MAY be an issue that those devising a COM or C++ language binding for the DOM will have to address. Basically, the DOM WG itself won't be defining those language bindings (except to the extent that one can generate a C++ binding from the CORBA IDL); As I understand it, Microsoft will be submitting a COM IDL binding to the W3C at some point, and some organization could presumably do the same for "raw" C++. Basically this is a loose end that the DOM spec itself will not address, but hopefully people of good will will coordinate to define other language bindings that define language-specific DOM extensions in a "standard" way. >The spec could be read to imply that Node insertion passes ownership to >the containing node and removal/replacement returns ownership to the >caller. Is this a reasonable interpretation? That might be a reasonable approach, but I know that *I* never wrote anything into the spec with this thought in mind. Can you point to a particular bit of the spec that needs clarifying? Mike
Received on Tuesday, 26 May 1998 22:43:03 UTC