Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoPtr: do 'duplicate' before 'release' #4068

Merged
merged 1 commit into from Nov 23, 2023

Conversation

funny-falcon
Copy link
Contributor

Common knowledge in reference counting is "on assignment increment first then decrement", because "just to be deleted" object could hold last reference to "just to be assigned" one.

Fixes #3979

Common knowledge in reference counting is "on assignment increment first
then decrement", because "just to be deleted" object could hold last
reference to "just to be assigned" one.

Fixes pocoproject#3979
@aleks-f aleks-f requested a review from obiltschnig July 11, 2023 12:05
@aleks-f aleks-f added this to the Release 1.13.0 milestone Nov 23, 2023
@aleks-f aleks-f merged commit 904075e into pocoproject:devel Nov 23, 2023
7 of 15 checks passed
aleks-f pushed a commit that referenced this pull request Nov 27, 2023
Common knowledge in reference counting is "on assignment increment first
then decrement", because "just to be deleted" object could hold last
reference to "just to be assigned" one.

Fixes #3979
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check _ptr != ptr is not enough in AutoPtr.assign
2 participants