Yes, this is confusing, still it is not wrong. If the destructor code itself 
e.g. uses an iterator to free up sub components that iterator may add and then 
free a reference. This leads to a loop that tries to free the item over and 
over again unless the destructor code holds a proper reference.

>From an conceptual POV it is also correct that the destructor basically takes 
>the last reference from the caller and holds it until it is finished with the 
>clean up.

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

Message ID: <rpm-software-management/rpm/pull/3370/c2410420...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to