coldfusion - structDelete doesn't affect the shallow copy? -
I was playing around error because I tried to create an error using a large XML document object.
& lt; Cfset XMLByRef = variables.parsedXML.XMLRootElement.XMLChildElement & gt; & Lt; Cfset structDelete (variables.parsedXML, "XMLRootElement") & gt; & Lt; Cfset startxML shortlove = getTickCount () & gt; & Lt; Cfloop = "1" from = "#arrayLen (variables.XMLByRef) #" index = "variables.i" & gt; & Lt; Cfoutput & gt; # Variables.XMLByRef [variable. I] .id.xmltext # & lt; / Cfoutput & gt; & Lt; Br / & gt; & Lt; / Cfloop & gt; & Lt; Cfset stopXML short loop = matching () & gt;
I hope to get an error because I removed the structure that I was referring to.
From LiveDocs:
variable assignment - creates an additional reference, or alias for the structure. Any change in data uses a variable name changes the structure that you access using other variable names. This technique is useful when you want to add a local variable to another location or otherwise want to change the scope without any variables, instead of
580df1de-3362-ca9b- B287-47795b6cdc17
25a00498- to get
0f68-6f04-a981-56853c0844ed
... ... ...
db49ed8a-0ba6-8644-124A-6d6ebda3aa52
57e57e28-e044- 611 9-F-2bb 549342
12805 in 297 milliseconds Bar Lowed
& lt; Cfdump var = "#variables #" & gt; ;
Shows nothing in the structure, with the value of XMLRootElement just parsedXML.xmlRoot.xmlName. I too
Structure Claire for both.
More information on removing XML document objects
Can someone understand my flawed logic? Thank you.