> does anyone has any experience with flyweight pattern with refernce
counting
I think this is OT but:
Not the flyweight pattern gc'tor exactly.
More of a differential or cyclic weighted pattern:
http://groups.google.com/groups?selm...crnsc02&rnum=1
atomic_ptr collector uses an atomic differential reference count.
My collector collects multi-objects using a single proxy reference count.
Those garbage collectors will give you an idea on how to write fast,
race-condition free, atomic garbage collected objects without having to use
separate threads, or any damn mark-and-sweep type crap.
Enjoy!
i want to share objects between multiple clients and want to delete
the object from shared pool when the last client deletes a refernce to
it
It depends on how you want to share you objects. You may not even need
special reference counting. You might be able to use "normal" reference
counting...
--
The designer of the experimental, SMP and HyperThread friendly, AppCore
library.
http://AppCore.home.comcast.net