Okay, so taking this a step further, If I take a component and create
an object out of it, stored in varible x, set variable y equal to
variable x, change a value in variable x, the value in y should have
changed as well?
On 9/26/05, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> Line 9 isn't deleting the object, it's deleting a REFERENCE to the
> object. The object is only dead when all references to it are gone.
>
> cheers,
> barneyb
>
> On 9/26/05, John Samson <[EMAIL PROTECTED]> wrote:
> >
> >
> > If CFCs are copied by reference [as the output at line 8 suggests] then how
> > come I can still reference an object [line 10] once it has been deleted
> > [line 9]? I would expect line 10 to throw an error but it doesn't, however,
> > an attempt to reference session.nameObj at the same place does.
> >
> >
> >
> > Can anyone help me understand what I am seeing?
> >
> >
> >
> > 1. <cfapplication sessionmanagement = "true">
> >
> > 2. <cfset session.nameObj = createObject('component',
> > 'nameComponent').init()>
> >
> > 3. <cfset session.nameObj.setName("Elaine")>
> >
> > 4. <cfoutput>
> >
> > 5. <cfset variables.namePointer = session.nameObj>
> >
> > 6. #variables.namePointer.getName()#<br>
> >
> > 7. <cfset session.nameObj.setName("Richard")>
> >
> > 8. #variables.namePointer.getName()#<br>
> >
> > 9. #structDelete(session, "nameObj")#
> >
> > 10. #variables.namePointer.getName()#<br>
> >
> > 11. </cfoutput>
> >
>
>
> --
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/
>
> Got Gmail? I have 100 invites.
>
>
> ----------------------------------------------------------
> 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]
>
>
>
--
Ryan Guill
BlueEyesDevelopment
[EMAIL PROTECTED]
www.ryanguill.com
(270) 217.2399
got google talk? Chat me at [EMAIL PROTECTED]
The Coldfusion Open Application Library - COAL - http://coal.ryanguill.com
www.ryanguill.com/
The Roman Empire: www.ryanguill.com/blog/
----------------------------------------------------------
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]