During our site rewrite, we opted to use the request scope over the variables 
scope for all "view" (CFM) pages. We use onRequestStart() to make sure certain 
global site variables are available in the request scope. 

After reading this article:
http://www.schierberl.com/cfblog/index.cfm/2006/10/16/memoryLeak_variablesScope

it turns out using the request scope everywhere was a great boon to the 
project. One of our legacy applications uses Application.cfm, relies on the 
variables scope and has major memory issues. If you look down in his Summary, 
#4 says "Calling structClear(variables) in onRequestEnd.cfm will destroy 
unwanted references tied to variables scope".

We added this code to one server in the middle of the day and watched the 
memory on that server drop like a rock as soon as it deployed. We promoted it 
to the rest of the servers and they've all been behaving much better ever since.

-- Adrian

>Err, how is it a 'pseudo-scope"? The request scope is a real scope
>(don't give it any confidence issues!) just as much as Variables. And
>I'll repeat my earlier assertion - that maybe seeing Request.Foo will
>help it stand out compared to Variables.goo.
>
>On Thu, May 22, 2008 at 8:21 PM, Dominic Watson
><[EMAIL PROTECTED]> wrote:
>-- 
>===========================================================================
>Raymond Camden, VP of Software Dev, Broadchoice
>
>Email : [EMAIL PROTECTED]
>Blog : www.coldfusionjedi.com
>AOL IM : cfjedimaster
>
>Keep up to date with the community: http://www.coldfusionbloggers.org 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305954
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to