|
Boost : |
Subject: Re: [boost] Review Request: Singularity
From: Alexey Tkachenko (iskaspb_at_[hidden])
Date: 2011-08-24 09:29:06
On 24-Aug-2011, at 9:18 PM, Mathias Gaunard wrote:
> On 24/08/2011 04:28, Ben Robinson wrote:
>> Mathias,
>>
>> I think this discussion is getting a little off track. There is a lot
>> of literature on creating a thread-safe Singleton that manages the lifetime
>> of your object according to your needs. However, there is no silver bullet
>> for the pattern. Different variants make different tradeoffs depending on
>> the user's needs. The three issues that are inherent to Singleton are:
>>
>> 1) You have little control over when the Singleton is destroyed. Should you
>> have multiple Singleton which depend on each-other, very often you need a
>> very specific teardown order.
>
> It should be the inverse order of the construction order.
Consider dependency between singletons
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk