Skip to content

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

Merged
aleks-f merged 1 commit intopocoproject:develfrom
funny-falcon:fix-autoptr
Nov 23, 2023
Merged

AutoPtr: do 'duplicate' before 'release'#4068
aleks-f merged 1 commit intopocoproject:develfrom
funny-falcon:fix-autoptr

Conversation

@funny-falcon
Copy link
Copy Markdown
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
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