hello carlo,
i finished implementing my "LooseMinPool" : )
you may find the source on sourcepod: http://www.sourcepod.com/rptzcu29-4656 .
core pool functionality:
- uses an array to store released instances:
if a instance is requested (get()), the last element of the array will be returned (and removed from the array).
on release() the freed instance will be put back into the array again as the last element. - the pool is cleared frequently (configured by timeout parameter):
on timeout all the pooled instances are checked for their last access and instances that were not used since last timeout, are removed.
i tested the pool during the last days and it seems to work (meaning i did not recognized any fundamental errors or performance issues yet ; )).
maybe you could take a look at the code and inform me in case i did something stupid? O: )
thank you for your attention!
regards
robert