You need to do it for structures and queries which are accessed by reference

arrays and simple values are passed by value so no you dont need it for
them.

The reason i bought it up was that if you have code which loops through a
whole scope and copies it then you dont necessarily know what var type it is
so have to use duplicate to be safe.

Alex

-----Original Message-----
From: Matt Horn [mailto:[EMAIL PROTECTED]
Sent: 05 November 2003 12:40
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] Request scope


This is only for complex session vars tho .. like structs
?

----- Original Message -----
From: "Chris Tazewell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 2:37 PM
Subject: Re: [ cf-dev ] Request scope


> > Isn't this only true is you have not copied the value back again...?
>
> It's irrelevant. If you use
>
> <cfset Request.MyVar = Session.MyVar>
>
> and then access Request.MyVar... you're still accessing the shared scope
> variable indirectly
>
> You need to use
>
> <cfset Request.MyVar = Duplicate(Session.MyVar)>
>
> Taz
>
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]





-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to