Hi,

I've just been looking at the post below by Chris Peterson and I'm
very interested in this bit in particular:

========================================================

Before: cfset request.leaky = application.leaky

After: cfset request.leaky = duplicate( application.leaky )

This simple example is just an illustration of how you can get
yourself into trouble when pointing a reference to objects from a
shared scope like application or server, into a local scope like
request.  When we make a link from the request scope into the
application scope, it maintains a reference such that the request
variable would never go away until the referencing application
variable gets garbage collected (which would wait for the application
timeout).  By duplicating the object into the request scope instead,
this ensures there is no reference to the application scope variable,
which allows it to be cleaned up after the request completes.

========================================================

If the code in index.cfm had been

<cfset leaky = application.leaky>

Is the same issue present?

I guess what I really want to know is:

1. What is the default scope in a cfm if you don't specify a scope?
2. What is the best practice for referencing app scope cfc's from a
cfm page?

Many thanks,
Andrew.




On Feb 19, 7:15 am, Dave <davidame...@gmail.com> wrote:
> Steve,
>
> If you want to see what's in memory in terms of what objects, data,
> etc are on the Heap then you will need take a heap dump and analyse
> it. I use tools like VisualVM and MAT to do this. 
> See:http://www.alagad.com/blog/post.cfm/troubleshooting-coldfusion-perfor...
> for details
>
> It takes a while to get the hang of it, but AFAIK, it's the only way.
>
> dave
>
> On Feb 18, 1:46 pm, "Steve Onnis" <st...@cfcentral.com.au> wrote:
>
> > Yeah i can see that but i want to see whats in memory which it cant seem to
> > do...or am i missing something?
>
> >   _____  
>
> > From: Kai Koenig [mailto:k...@koeni.de]
> > Sent: Thursday, 18 February 2010 12:24 PM
> > To: cfaussie@googlegroups.com
> > Subject: Re: [cfaussie] Seefusoin Vs Fusion Reactor
>
> > Fusion Reactor can def. kill requests.
>
> > Cheers
> > Kai
>
> > What i am looking for is something that will show me requests based on
> > memory usage to i can see what is consuming memory and how much of it.
>
> > I have installed FusionReactor and it doesn't seem to have anything like
> > this..it just tells you what the memory was like when the request was made.
>
> > I tried to install Seefusion and the install failed and now i cant even seem
> > to run the installer anymore...gives me an error saying "Failed to load java
> > VM library: [java path selected in previous install attempt] (errno = 1930)"
> > message.
>
> > Can you not run these together?  Can anyone recommend a tool that will do
> > this?  I need to be able to kill of requests that are consuming memory and
> > free it up.
>
> > Steve
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "cfaussie" group.
> > To post to this group, send email to cfaus...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cfaussie+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/cfaussie?hl=en.
>
> > _________________________________________________
> > Kai Koenig - Ventego Creative Ltd
> > ph: +64 4 476 6781 - mob: +64 21 928 365 /  +61 450 132 117
> > web:http://www.ventego-creative.co.nz
> > blog:http://www.bloginblack.de
> > twitter:http://www.twitter.com/agentK
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "cfaussie" group.
> > To post to this group, send email to cfaus...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cfaussie+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to