forked from boostorg/smart_ptr
Avoid static destruction order issues with quick_allocator.
[SVN r58275]
This commit is contained in:
@ -74,8 +74,9 @@ template<unsigned size, unsigned align_> struct allocator_impl
|
||||
|
||||
static lightweight_mutex & mutex()
|
||||
{
|
||||
static lightweight_mutex m;
|
||||
return m;
|
||||
static freeblock< sizeof( lightweight_mutex ), boost::alignment_of< lightweight_mutex >::value > fbm;
|
||||
static lightweight_mutex * pm = new( &fbm ) lightweight_mutex;
|
||||
return *pm;
|
||||
}
|
||||
|
||||
static lightweight_mutex * mutex_init;
|
||||
|
Reference in New Issue
Block a user