yes, the easiest way to think of this stuff is whenever an object is
created, the creating scope just gets a pointer to the object in
memory

when it is "passed by reference" a copy of the pointer is created in
the new variable.  So as long as one pointer exists the object exists.

Bill
On 11/20/05, Mark Mandel <[EMAIL PROTECTED]> wrote:
> Biaz -
>
> As long as there is a reference to an object in some scope (be is
> persistant, or otherwise) the object will be kept in memory.
>
> If there is no reference to an object is any scope, then eventually it
> will be destroyed when it is picked up by the garbage collector.
>
> Mark
>
> On 21/11/05, Baz <[EMAIL PROTECTED]> wrote:
> > If CFCs are passed by reference, the following code only creates 1 object in
> > memory:
> >
> >       <cfset variables.Object=createobject(MyCFC) />
> >       <cfset session.Object= variables.Object />
> > But what happens if the subsequent page request asks for session.Object?
> >       <cfdump var="#session.Object#" />
> > Isn't session.Object referencing a non-existent object since
> > variables.Object was part of the previous request?
> > Baz
> >
>
> --
> E: [EMAIL PROTECTED]
> W: www.compoundtheory.com
> ICQ: 3094740
>
>
> ----------------------------------------------------------
> 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).
>
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[email protected]
>
>
>


--
[EMAIL PROTECTED]
http://blog.rawlinson.us

If you want Gmail - just ask.


----------------------------------------------------------
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).

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


Reply via email to