We've put the majority of our CFCs in the application scope.
The problem is that when we access any function in the CFC
that has a CFQUERY, the cfquery creates a variable named
"cfquery.executiontime". This is like when you call CFFILE and it
leaves behind a "cffile" struct.
However, with cffile, we can use
<cfset var cffile="">
in the function and and that makes sure that the cffile is
created local to the function and not in the application scope.
The problem is that when we use
<cfset var cfquery="">
<cfset var cfquery=structnew()>
It still creates a "cfquery.executiontime" variable in the
I think this may be leading to problems with garbage
collection as our memory gets used up quickly. At any rate, it
feels sloppy to leave it like this.
I wrote a little script that goes through all our CFCs and
looks for leaked variables in the application scope and cfquery is
the only one I could find.