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

Decrease dict key reference. #394

Merged
merged 2 commits into from
Mar 23, 2020
Merged

Conversation

suola
Copy link

@suola suola commented Mar 20, 2020

Changeset c9f8318 changed how dict items are iterated. As a consequence, a reference to a dict key remains - clear it.

Fixes #392

Changes proposed in this pull request:

  • Fix memory leak

Note: I'm not very familiar with python c-api, and I don't understand why the mentioned changeset triggered the bug.

Changeset c9f8318 changed how dict items are iterated. As a consequence,
a reference to a dict key remains - clear it.
@suola
Copy link
Author

suola commented Mar 20, 2020

Found that this is a duplicate of #270 with the same issues. Closing.

@suola suola closed this Mar 20, 2020
@suola suola deleted the dict-key-decref branch March 20, 2020 22:36
@hugovk
Copy link
Member

hugovk commented Mar 21, 2020

Thanks for the PR!

#270 currently has merge conflicts and test failures, and I don't know if/when that PR will be ready, so we've merged other subsets in the meantime, see #270 (review).

So I'd be happy to get this merged and released sooner too.

Please could you re-open it?

@suola suola restored the dict-key-decref branch March 21, 2020 08:59
@suola suola reopened this Mar 21, 2020
@hugovk
Copy link
Member

hugovk commented Mar 21, 2020

Thanks! Travis is under maintenance right now, will check back later on the pending builds.

https://www.traviscistatus.com/incidents/6sf4v7bcwmrz

@hugovk hugovk added bug Something isn't working changelog: Fixed For any bug fixes labels Mar 22, 2020
@hugovk
Copy link
Member

hugovk commented Mar 23, 2020

Travis doesn't want to restart those jobs in https://travis-ci.com/github/ultrajson/ultrajson/builds/154359958, but it's clearly not related to this and they passed in https://travis-ci.org/github/ultrajson/ultrajson/builds/665134263 so let's merge this. Thanks!

@hugovk hugovk merged commit 27f7557 into ultrajson:master Mar 23, 2020
@suola suola deleted the dict-key-decref branch March 25, 2020 06:47
mrunge added a commit to mrunge/python-gnocchiclient that referenced this pull request Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working changelog: Fixed For any bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ujson v2.x leaks memory
2 participants