Dave,

The way you make it sound, the instance of the UDF that is run stays
in memory as long as there is a reference to the query that it
contains.
If I expanded the example to say that the UDF was a method of some
component and was being called with a cfinvoke, the same case would
apply. The component instance will stay in memory as long as a
reference to the query exists, even though the query should be local
to the UDF and nothing should be returned from the UDF.

You also use the term "go out of scope" which I take to mean "can no
longer be accessed, but still exists in memory". I assume this is
linked to my other question about the memory used by invoked
components being reused or not. If the memory is not reused, the
component stays in memory but is no longer accessible ('out of scope')

Rather useless questions, but...

Thanks. :)
--
Michael Dinowitz

> Queries are always, ALWAYS, passed by reference, no matter what you're
> passing them into or out of. Let's assume you have a line below the
> function:
>
> <cfset myquery = test()>
>
> In this case, there are two references that point to the same object,
> assuming that you're calling the function and returning the value into
> a variable of your own. But there's only one object. The reference
> inside the function (local.manga) will go out of scope when the
> function exits, but the object corresponding to that reference will
> only go out of scope when the variable myquery itself goes out of
> scope.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> http://training.figleaf.com/
>
> Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
> GSA Schedule, and provides the highest caliber vendor-authorized
> instruction at our training
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331511
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to