Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-14 11:09:31


From: "Gennadiy E. Rozental" <rogeeff_at_[hidden]>
> GoF defines Singleton as a pattern that ensures a class only has one
> instance and provide a global point of access to it. GoF does not
> elaborate the lifetime policy nor put any restriction on it.

OK. What problems does this pattern solve?

> You can
> have a singleton that exist from start to end, or you can have one
> that exist only when used. Anyway, the name is not important. What I
> am looking for is a shared resource with a managed lifetime policy, a
> synchronization policy and switchable traits that will allow to
> manage such things like type of instance().

Again, what problems does this class solve?

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk