Boost logo

Boost :

Subject: [boost] [flyweight][#3658] Dependency on static initialization/destruction order
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-11-28 08:22:16


I've created the ticket #3658 [1] on the flyweights library. The ticket
is about Boost.Flyweight depending on the static
initialization/destruction order, which can lead to application crashes
in some cases.

The library does provide certain tools to work around the problem [2],
but these tools are only usable in the most obvious cases and do not
solve the problem in its root.

What I have proposed in the ticket is to implement reference counting in
the flyweights, so that the flyweight value is only destroyed when no
flyweight handles refer to it. AFAIK, Boost.Flyweight already has
reference counting, so the work is only to shift value owning from the
holder to the flyweights.

Comments are welcome.


Boost list run by bdawes at, gregod at, cpdaniel at, john at