>    virtual IDOM_Node *getFirstChild() const = 0;
>The implementation has no idea how long a the returned child is in use,
>because it is being returned as a raw pointer.

The implementation may not know, but the application _does_. An assumption
in the IDOM approach is that the application will be actively involved in
memory management. The downside is that this is more work; the upside is
that this allows memory to be managed more effectively and efficiently.

For many uses, the IDOM approach is significantly better. For those where
it isn't, I'd suggest an additional layer that implements the
wrapper-object solution. That way apps which don't want to bother tracking
usage can get that behavior, but ONLY those apps pay the storage and
computational surcharge of supporting that mode of operation.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to