|
Boost : |
From: Thomas Matelich (sosedada_at_[hidden])
Date: 2000-05-31 13:51:21
Branko Èibej wrote:
> I've put a revised version of the singleton class into the vault
> (folder singleton). The interface is completely different, based
> on the many ideas and examples that came up in the discussions in
> the last few weeks; thanks, everyone!
>
> This implementation is still not thread safe (although it should
> be easy to make it so), but it does have a few other nice features:
>
> - supports singleton class hierarchies and derived singletons;
> - guarantees destruction of the singleton instance;
> - provides a mechanism to explicitly define the destruction
> order of singletons.
>
> There's still no documentation (sorry, sorry), but there are a few
> test cases in the tests folder that show intended usage. I tested
> with MSVC++ and (very) recent versions of g++.
>
> Again, any feedback would be much appreciated.
>
> Brane
>
I'm not catching the usage of ordering. Is it necessary for when you have
two active singletons? Ahh... now I see. The order in which you create
the ordering objects (remembering to keep related ordering objects in one
file) is the order in which the are destroyed? Is that right?
-- Thomas O Matelich Senior Software Designer Zetec, Inc. sosedada_at_[hidden] tmatelich_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk