[Rpm-maint] [rpm-software-management/rpm] Turn nrefs into atomic_int (PR #3370)

Panu Matilainen notifications at github.com
Mon Oct 14 08:18:44 UTC 2024


>From the commit message
> Technically the *Free() functions should *Link() the instance after the
ref count has reached 0 and the decision to free it has been made. 
> Otherwise the cleanup code linking and freeing to will lead to a
recusions. This is omitted here as it is not needed.

This is actually rather confusing, because a destructor should *not* be mucking around with reference counts. If the reference count reached zero and we decided that it's time to kill it, then we are the last thing that can be accessing it, no?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3370#issuecomment-2410399790
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3370/c2410399790 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241014/15928aec/attachment-0001.html>


More information about the Rpm-maint mailing list