I started to make my own SharedPtr class for OGE, as i want to use TBBs spin_mutex for the reference counting instead of a full mutex as we need it to run as fast as possible. i realised that the only thing that needs to change is the reference counter class.
Would it be possible/allowed to add a template paramater to the Poco::SharedPtr class that you can specify the class to use as the reference counter? it can be defaulted to use the ReferenceCounter class you already have so i don't think it would involve any changes for anyone using it, but it would be possible to specify my own ReferenceCounter class that uses a different type of mutex. Also if an application was guarateed to be single threaded a reference counter with no mutex/lock could be used.
what do you think? should i do this?
Chris





