ironpython2 icon indicating copy to clipboard operation
ironpython2 copied to clipboard

Use or expose DebugContext ResetSourceFile method

Open gpetrou opened this issue 5 years ago • 0 comments

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.

gpetrou avatar Jul 29 '18 10:07 gpetrou