AFAIK: I think that shows that the session pointer to the object in memory (query) is deleted, but because there is another pointer to the object - q -, then the object in memory is not deleted by the garbage collection.
i.e session.qncache is not a query, its a pointer to a query object in memory. so q = session.qncache_qn means "get me another pointer to the object that session.qncache_qn points to" -----Original Message----- From: Terry Ford [mailto:[EMAIL PROTECTED] Sent: 05 January 2006 15:10 To: CF-Talk Subject: Re: Avoiding copying by value Hi Joe, That's what I used to think, too. But take the following code: <cfset q = session.qncache_qn> <cfset structdelete(session,"qncache_qn")> <cfdump var="#q#"> That cfdump works. This shows that the whole query HAS been copied to Q. Regards, Terry >Hey Terry, > >Queries are references types in CF, so it's not an issue. Example: > ><cfset qry1 = queryNew("column") /> ><cfset queryAddRow(qry1) /> ><cfset querySetCell(qry1, "column", "foo") /> > ><cfset qry2 = qry1 /> ><cfset querySetCell(qry2, "column", "bar") /> > ><cfdump var="#qry1#" /> ><cfdump var="#qry2#" /> > >-Joe > > >On 1/5/06, Terry Ford <[EMAIL PROTECTED]> wrote: >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228481 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

