On Wed, Apr 11, 2001 at 04:26:09PM -0400, Cem Karan wrote:
> Anyone who wants to jump in and correct me, please do so.
>
> Xerces tries to use reference counting wherever possible to
> automatically dispose of unused memory in much the same way that Java
> does it. If you actually use new and delete, then the built-in garbage
> collection won't work because the reference counting will be wrong.
I understand about reference counting, but I cannot get how
new and delete in the example below will fool memory
management. Or xerces use garbage collection that looks
at allocated memory regions and try to figure out if
it is time to free the region. It is not reference counting.
> >
> > what is the difference between
> >
> > {
> > DOM_Document *pdoc=new
> > DOM_Document(impl.createDocument(...));
> >
> > ...........................
> > delete pdoc;
> > }
> >
> > and
> > {
> > DOM_Document doc=impl.createDoc(...);
> > ......................
> >
> > }
> >
As I stated earliar I need to be able to pass pointer to
doc out of C++ function to C part of the programm
and the have it passed back like a handle.
--
Sincerely Yours, Konstantin Kivi, Russia, [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]