You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bdb holds the reference to the enter frame unnecessarily long #128991
bdb records the frame that enters the debugger as a utility. However, that could potentially cause a temporary refleak. It will probably clean up eventually, but a temp leak on a frame object is expensive - it links to all the caller frames and their local variables.
I did an attempt in #128190, but it's not perfect. There are two major issues:
The reference will only be released when the debugger is detached (when the user does a continue and there's no breakpoint). In many cases, the reference could be hold for a long time, but it's something that's only needed on the particular callback.
Because of 1., in 3.12, where there are multiple pdb instances created for different inline-breakpoints, the reference could still be leaked (because we did continue in a different pdb instance).
I will refactor the code a bit so the reference to enter frame will always be released before the debugger callback is finished.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Activity
gh-128991: Release the enter frame reference within bdb callback (#12…
[3.13] pythongh-128991: Release the enter frame reference within bdb …
[3.13] gh-128991: Release the enter frame reference within bdb callba… (
[3.12] gh-128991: Release the enter frame reference within bdb callba… (
pythongh-128991: Release the enter frame reference within bdb callback (