Okay, so if it is in the pool its available.  I understand that, and
understand circular lists, but what I don't understand is how I would
return a instance back to the pool once I am done with it, as I am not
completely done with it until after the return from the method?  I
could set a flag once the return is called, but I would still have to
have another process to check that flag and put the instance back into
the pool.

I am just interested in this pooling method for curiosities sake, for
now at least I am going to just create and instantiate a new object
every time.  The object is small, no pseudo-constructor code, no
inheritance and really shouldn't be too much of a hit at all.

Thanks guys,

On 10/25/05, Sean Corfield <[EMAIL PROTECTED]> wrote:
> On 10/25/05, Ryan Guill <[EMAIL PROTECTED]> wrote:
> > The one question I have about the pooling is, how do you know when an
> > object in the pool is available and not in use currently?
>
> If it's in the pool, it's available by default. A pool generally keeps
> instances in a data structure to manage them - an array or a linked
> list. When an instance is handed off to client code, the data
> structure is updated to reflect that (the array might be a circular
> list, for example, with an index variable representing the next
> available instance and another one indicating the 'back' of the list;
> the linked list would just be updated to have a new 'head'). You're
> going to need to start reading about data structures + algorithms to
> get a good handle on this...
> --
> Sean A Corfield -- http://corfield.org/
> Got frameworks?
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to 
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the 
> email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
> (www.cfxhosting.com).
>
> CFCDev is supported by New Atlanta, makers of BlueDragon
> http://www.newatlanta.com/products/bluedragon/index.cfm
>
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[email protected]
>
>
>


--
Ryan Guill
BlueEyesDevelopment
[EMAIL PROTECTED]
www.ryanguill.com
(270) 217.2399
got google talk?  Chat me at [EMAIL PROTECTED]

The Coldfusion Open Application Library - COAL - http://coal.ryanguill.com

www.ryanguill.com/
The Roman Empire: www.ryanguill.com/blog/


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to