If you're worried about that, then yes, I'd create a singleton instance
of the UDF CFC in the application scope, and then pass a reference to
that into the session CFC when you initialize it...

<cfset session.mySessionCFC = createObject( 'component', 'sessionCFC'
).init( application.UDFCFC ) />

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
> Of Marlon Moyer
> Sent: Wednesday, September 29, 2004 1:59 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] Function Libraries
> 
> On Wed, 29 Sep 2004 12:55:10 -0400, Brian Kotek <[EMAIL PROTECTED]>
> wrote:
> > You could also just create an instance variable that holds your UDF
CFC
> > in your init() function.
> >
> > <cffunction name="init">
> >   <cfset variables.udfObject = createObject( 'component', 'udf'
).init()
> > />
> >   <cfreturn this />
> > </cffunction>
> >
> 
> This is how I do it right now, but it just seems that if every object
> in each session instantiate the function library, there's a lot of
> memory being used.
> 
> 
> --
> Marlon
> ----------------------------------------------------------
> 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]

----------------------------------------------------------
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]

Reply via email to