> On Monday, Sep 30, 2002, at 09:23 US/Pacific, S. Isaac
> Dealey wrote:
>> Question: (dunno if anyone has the answer to this) Do
>> CFC's share
>> methods in
>> memory, or does each new component created have its own
>> instances of
>> all the
>> functions defined in the cfc which take up their own
>> space in memory?
>> The
>> one way saves memory, the other way theoretically might
>> allow you to
>> modify
>> a method of one component on the fly without altering the
>> definition
>> of the
>> CFC.

> Each instance has a public data member which is the
> 'pointer' to the
> function but the actual function code is shared between
> all instances.
> What that means is if you have a CFC with 20 public
> methods, then each
> instance will contain 20 'pointers' to that code.

Awesome... Much more efficient this way. :) And the functionality which is
potentially lost is something that would see very little use anyhow -- ( and
I think liable to be problematic and cause confusion, so probably best
avoided anyway ) ... but I was curious about the way it was implemented.
This was what I suspected... my Tapestry cms currently works on a very
similar model in CF 5 using libraries of custom tags as the methods, and
structure elements as pointers where the key is the name of the method and
the value being a relative path to the custom tag, which allows the methods
to be inherited from parent classes. Good to know there's a parallel there,
even if it's not necessarily practical knowledge. :)

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to