ULONG STDMETHODCALLTYPE ClassFactory::Release()

in ProfilingAPI/ELTProfiler/ClassFactory.cpp [33:42]


ULONG STDMETHODCALLTYPE ClassFactory::Release()
{
    int count = std::atomic_fetch_sub(&this->refCount, 1) - 1;
    if (count <= 0)
    {
        delete this;
    }

    return count;
}