xmldocument - Is it safe to return a cloned XmlNode of a local IXmlDocument in Delphi? -
i on delphi xe2. have common function takes xml string , returns clonenode of root ixmlnode. supposed commonizing settings xmldocument. inside of function use local variable ixmldocument , call things newxmldocument , modify parse options.
but found occasionally, accessing fields of returned cloned node outside gives av, when accessing childnodes field.
is such problem occurring because local variable ixmldocument goes out of scope function ends , interface reference count mechanism freed it, ignoring whether has cloned node?
Comments
Post a Comment