on 6/10/03 2:55 PM, Raymond Camden at [EMAIL PROTECTED] wrote:

> By the way, there is one more scope you should be convered with - and
> that is 'var' scoped method variables. Whenever you use a value in a
> method, a value that is NOT meant to exist in the CFC whole, you should
> use the var scope. Here is an example:
> 
> <cffunction name="getCrap" .....>
> <cfargument name="id" ....>
> <cfset var myQuery = "">
> 
> <cfquery name="myQuery" ...>
> ...
> </cfqyery>
> 
> <cfreturn myQuery>
> 
> </cffunction>

So this example was meant to show how to protect variables inside the
method? If I follow correctly, you created a variable scoped to the 'var'
scope (named "myQuery"), then set the variable equal to the value of the
Query? Does this mean that, if I follow what you say below...
 
> ANY variable created inside a method should be var scoped (unless you
> want it to exists outside the method). Don't forget things like
> <cfquery> create values, ditto for cfdirectory, etc.

...that normally, a query object that would be created, as a result of
performing a query, are now only available to that method (since you scoped
it 'var') and as soon as the object is no longer being used, the variable
'disappears' as part of the whole CFC garbage collection?

Is it garbage collection?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to