void release() // nothrow
 {
     if( atomic_dec_32_nv( &use_count_ ) == 0 )
     {
         dispose();
         weak_release();
     }
 }
Exemplo n.º 2
0
 void release() // nothrow
 {
     if( BOOST_SP_INTERLOCKED_DECREMENT( &use_count_ ) == 0 )
     {
         dispose();
         weak_release();
     }
 }
Exemplo n.º 3
0
 void release() // nothrow
 {
     if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )
     {
         dispose();
         weak_release();
     }
 }
 void release() // nothrow
 {
     if( atomic_decrement( &use_count_ ) == 1 )
     {
         dispose();
         weak_release();
     }
 }
Exemplo n.º 5
0
 void release() // nothrow
 {
     if( --use_count_ == 0 )
     {
         dispose();
         weak_release();
     }
 }
Exemplo n.º 6
0
void sp_counted_base::release() // nothrow
{
    if( atomic_exchange_and_add( &use_count_, -1 ,&lock_) == 1 )
    {
        dispose();
        weak_release();
    }
}
Exemplo n.º 7
0
    void release() // nothrow
    {
        BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
        long new_use_count = --use_count_;
        BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );

        if( new_use_count == 0 )
        {
            dispose();
            weak_release();
        }
    }
Exemplo n.º 8
0
    void release() // nothrow
    {
        pthread_mutex_lock( &m_ );
        long new_use_count = --use_count_;
        pthread_mutex_unlock( &m_ );

        if( new_use_count == 0 )
        {
            dispose();
            weak_release();
        }
    }
    void release() // nothrow
    {
        {
#if defined(BOOST_HAS_THREADS)
            mutex_type::scoped_lock lock(mtx_);
#endif
            long new_use_count = --use_count_;

            if(new_use_count != 0) return;
        }

        dispose();
        weak_release();
    }