LeapGL/host/libs/Translator/include/GLcommon/SmartPtr.h
// Decrement the reference count on the pointer by 1.
// If the reference count goes to (or below) 0, the pointer is deleted.
Decrement the reference count on the pointer by 1.
If the reference count goes to (or below) 0, the pointer is deleted.
Decrement the reference count on the pointer by 1 . If the reference count goes to ( or below ) 0 the pointer is deleted .
int release() {
        if (!m_pRefCount) return 0;
        int iVal = android_atomic_dec(m_pRefCount);
        if (iVal > 1)
            return iVal - 1;
        delete m_pRefCount;
        m_pRefCount = NULL;
        if (m_ptr) {
            delete m_ptr;
            m_ptr = NULL;
        }
        return 0;
    }
int release ( ) { if ( ! m_pRefCount ) return 0 ; int iVal = android_atomic_dec ( m_pRefCount ) ; if ( iVal > 1 ) return iVal - 1 ; delete m_pRefCount ; m_pRefCount = NULL ; if ( m_ptr ) { delete m_ptr ; m_ptr = NULL ; } return 0 ; }
Decrement the reference count on the pointer by 1.
Decrement the reference count on the pointer by 1 .