
18 Jan
2008
18 Jan
'08
7:24 p.m.
Peter Dimov <pdimov <at> pdimov.com> writes:
What is the reason to prefer the current instance/lease formulation instead of
typedef ... instance_type; instance_type instance(); // automatically serves as a lease
?
Exactly. No reason what so ever IMO. Author argues that his design allows automatic locking of class method invocation. But IMO this iswrong in a first place and if necessary can be achived with layered design.
(Also, why mutexed_singleton? Mutexed is not a word; synchronized_singleton maybe?)
singleton<syncronized<T> > Gennadiy