> We had a long discussion here over whether it would be better > to pass the query in as opposed to just the name. Our concern > with passing in the query was that we would be duplicating > the query in memory--just in different places. With a small > query this would be no real concern, but with a big query we > thought it might be a problem. Especially as we are already > passing the query from a cfc into a cfm page. Does this make > sense or are we worrying about the memory too much/incorrectly??
It's good to worry about memory, I guess, but you don't have to in this case. Queries and structures are passed by reference, not by value. That means that when you do something like this: <cfquery name="qFoo" ...> .. </cfquery> <cfset qMyOtherNameForThisQueryObject = qFoo> that you only have one query object in memory, not two. Other sorts of variables, such as simple values and arrays, are passed by value, which means that when you assign one to another variable, you end up with two separate copies in memory. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

