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

Use or expose DebugContext ResetSourceFile method #475

Open
3 tasks done
gpetrou opened this issue Jul 29, 2018 · 0 comments
Open
3 tasks done

Use or expose DebugContext ResetSourceFile method #475

gpetrou opened this issue Jul 29, 2018 · 0 comments

Comments

@gpetrou
Copy link
Contributor

gpetrou commented Jul 29, 2018

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

Description

_sourceFiles in DebugContext holds items in memory that are not cleaned up.
This results in "memory" leaks everytime that DebugContext is used.
Looks like ResetSourceFile method was added long time ago to address this, but was never exposed/used.

Steps to Reproduce

Use sys.settrace or any code that enables using DebugContext.

Expected behavior:
Memory is cleaned up either automatically or user manually calls a method that exposes DebugContext ResetSourceFile. For example, DebugContext?.ResetSourceFile("<module>");

Actual behavior: Memory is not cleaned up.

Versions

2.7.8 and earlier, latest master as well.

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

No branches or pull requests

2 participants