"THIS" is a reference to the public scope of the instance, so you aren't actually creating a new instance in memory -- just passing a reference to the public scope of the existing instance.
In your example, though, you are not using CFINVOKE on the same instance created by your CFOBJECT -- so you end up with two different instances of your Stack CFC because your CFINVOKE is creating its own instance of Stack. If you pass your instance created with CFOBJECT into your CFINVOKE you'd find that MyStackInvoked and MyStackObject are actually the same instance. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Jeffry Houser > Sent: Thursday, December 11, 2003 1:33 PM > To: cfcdev > Subject: [CFCDev] Creating an Instance of a component > > > > Hi, > > The "standard" way I would use to create a component instance is use > cfobject. And then I'd use cfinvoke to call various methods of the > component. Often the first cfinvoke is an init type of method. > > If create an init method that will returns this, it seems to create a > component instance in memory the same way that cfobject would. Is this > what actually happens? > > I attached a test component and the file I was using to test this. The > tickcount wasn't much help since they were zero most of the time. > The dump > seemed to randomly change the order of methods in the component. > > ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
