ironpython2
ironpython2 copied to clipboard
Use or expose DebugContext ResetSourceFile method
Prerequisites
- [x] Are you running the latest version?
- [x] Are you reporting to the correct repository?
- [x] 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.