> This is the correct behavior in CF as well as in any other language I know of in which you can pass values by reference. The conceptual error you're making is that there is no "original" structure - there is simply a structure that has one or more references. When you create a structure and put it in a variable, that variable contains a reference to the structure, rather than the structure itself.
Dave, I don't think you understand me correctly, I understand that a REFERENCE is created and not a copy of the structure itself, if you read my message again you might see this. My question is: why is the reference not destroyed when the original structure is? When I update the original structure with another value the reference is updated, but why not destroyed? -- Taco Fleur Senior Web Systems Engineer http://www.webassociates.com -----Original Message----- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 November 2004 3:22 PM To: CF-Talk Subject: RE: Reference to complex var not destroyed > When I create a reference to a complex structure I was always under > the impression that the reference would be destroyed if the original > is destroyed, but it seems this is not the case. Can anyone confirm > whether this is normal behaviour or not? This is the correct behavior in CF as well as in any other language I know of in which you can pass values by reference. The conceptual error you're making is that there is no "original" structure - there is simply a structure that has one or more references. When you create a structure and put it in a variable, that variable contains a reference to the structure, rather than the structure itself. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184702 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

