You just overwrote it the second time. Probably not a big deal unless you had some important instance data in there.
To greatly oversimplify, it's like this: a="hello"; a="hello"; now what is the value of a? haha. Technically, what it does, with objects that pass by reference (cfcs, structs), it changes the reference from your first object to your second that you just created. Now the first object lost all its references and has been orphaned, so it's eligible for garbage collection. There is no way to recover an orphaned object. It sounds like you're wondering if there is any chance that someone will get the object before it's been init()ed, and, if you call your object like createObject().init(), then you'll be fine, or if you set all your instance variables before you set it into the application scope, you'll be fine, but if you set up the object's instance variables after setting it in the application scope, there's a chance you could make everything blow up. -- nathan strutz http://www.dopefly.com/ On 9/20/06, Will Tomlinson <[EMAIL PROTECTED]> wrote: > > You already had an object created in application scope, then it was > created again from somwhere else? So you create it twice. I just ran a test > and it didn't do anything bad. > > I have a mail notifier cfc that sends out mail. The way I had set it up > was to create it from a paypal IPN page. Now I need it in another page. > > What if it was created on the second page, then someone hit the paypal IPN > page? Would somethin clash and cause an explosion somehow? > > Am I making any sense here? :) > > I know I should probably go ahead and init() it in OnAppStart(), but > there's some data it needs and I dont wanna screw with it. > > Will > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253681 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

