If the CFC methods are stateless I would go with Jim's suggestion. Create a single instance of the CFC and pass that into a 'constructor' method of any component that needs access to those methods. Which scope you store the CFC in will depend on your application and what the methods in the CFC do.

Spike


Marlon Moyer wrote:
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.



--

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org
----------------------------------------------------------
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