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

Apparently, PySet_Add does not steal a reference, hence we should not forget to clean up ours. #3286

Merged
merged 1 commit into from Jul 2, 2023

Conversation

adamreichold
Copy link
Member

Closes #3285

@adamreichold adamreichold changed the title Apparently, PySet_Add does not steal a reference, hence we should forget to clean up ours. Apparently, PySet_Add does not steal a reference, hence we should not forget to clean up ours. Jul 2, 2023
@adamreichold
Copy link
Member Author

@adamreichold
Copy link
Member Author

If this ends up being correct, then I think this a candidate for backporting into a 0.19.x maintenance release.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This agrees with our implementation of PySet::add above. Looks like it's a regression since #2795 (i.e. 0.18.0).

I can try to backport tomorrow evening if nobody has time sooner.

@davidhewitt davidhewitt added this pull request to the merge queue Jul 2, 2023
Merged via the queue into main with commit 1a0c9be Jul 2, 2023
32 checks passed
@davidhewitt davidhewitt deleted the set-add-does-not-steal branch July 2, 2023 20:46
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.

Memory leak (with reproducer) when returning BTreeSet and HashSet from pyfunction
2 participants