Thanks.  That looks worthwhile. I'll give that a try and see if that removes 
the degrading across multiple uses. 

Robert Harrison 
Director of Interactive Services

Austin & Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:      http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_williams 


-----Original Message-----
From: Justin Scott [mailto:[email protected]] 
Sent: Monday, June 10, 2013 3:46 PM
To: cf-talk
Subject: Re: CFIMAGE .... Nearly Worthless?


> What do you mean?   You mean like variables.thevalue... or do you
> mean like  thisinstance.thisvalue, so each subsequent run has different 
> values?

The info that Ray pointed to gives a lot of great information.  The short 
version is that you can define those variables to be private and local to the 
function which instructs the runtime to throw them away when the function is 
done rather than holding them in memory for a long period.  In your case:

<cfset tempImage_path="#rootpath#\assets\project_gallery\temp">

Would become:

<cfset var tempImage_path="#rootpath#\assets\project_gallery\temp">

That extra "var" attribute after cfset tells the runtime that this is a private 
local variable and safe to discard once the function exits.
In older versions of ColdFusion all of the "var" type variables had to be 
defined immediately after any cfargument tags at the beginning of the function. 
 Once defined you refer to them normally within the fun

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355895
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to