From the xerces docs:
>Key points to remember when using the C++ DOM classes:
>   Create them as local variables, or as member 
>   variables of some other class.   Never "new" a 
>   DOM object into the heap or make an ordinary C 
>   pointer variable to one, as this will greatly 
>   confuse the automatic memory management. 

Why can't I 'new' dom objects? Is this wrong practise
unconditionally, or I only must be very careful?

what is the difference between

{
        DOM_Document *pdoc=new 
                DOM_Document(impl.createDocument(...));
                
...........................
        delete pdoc;
}

and
{
        DOM_Document doc=impl.createDoc(...);
......................
        
}

why I can make those objects being parts of the 
stucture and then alloc the that structure?
(the doc doesn't say I can't do so)

What I exactly need is to pass the pointer 
to DOM_Document or its equivalent (call it handle)
between C and C++ parts of the programm.

Sorry if I am asking something really stupid

-- 
Sincerely Yours, Konstantin Kivi, Russia, [EMAIL PROTECTED]


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

Reply via email to