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

Explicitly trigger GC prior to counting; fixes #39. #40

Merged
merged 2 commits into from
Jan 13, 2016
Merged

Explicitly trigger GC prior to counting; fixes #39. #40

merged 2 commits into from
Jan 13, 2016

Conversation

amcgregor
Copy link
Contributor

Thanks to a touch of assistance from #pypy, an explicit call to gc.collect() will force the objects to be collected rather than letting the runtime defer cleanup to some indeterminate future time.

Huge warning: This is not guaranteed to continue working in future pypy versions. Attempting to manipulate the GC is generally an Unwise Thing to Do™, Not Portable Between Runtimes™, and not too dissimilar to direct manipulation of the GIL. It'll probably be fine, but pypy supports modular GC policies and this has only been tested under the default policy.

mitsuhiko added a commit that referenced this pull request Jan 13, 2016
Explicitly trigger GC prior to counting; fixes #39.
@mitsuhiko mitsuhiko merged commit 8c7ec9b into pallets:master Jan 13, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants