On 5/12/05, enigment <[EMAIL PROTECTED]> wrote:
> What I was considering was doing the bigger work to create the thing once,
> in application scope, then (hopefully more easily) cloning it into the
> request scope for each request, so each request has its own independent
> object.

Cloning it will be as much work (possibly even more work) than just
creating and initializing it on each request.

> But isn't it true that saying request.MyCFC = application.MyCFC just gives
> the request var a pointer to the application instance? Not an independent
> copy?

Correct.

> Is it possible to clone a CFC, create a completely independent copy? How?

You have to write all the relevant code yourself, including calling
createObject() and copying all the base data etc etc.

In other words, you will not get any savings this way. And, to be
honest, if you need the CFC per request then the chances are that the
overhead is so small it really doesn't matter.

Premature Optimization...
-- 
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to