Skip to content

Conversation

@flit
Copy link
Member

@flit flit commented May 29, 2023

If Session.current_session is accessed without a valid current session, an empty Session is created and retained via a strong reference. This mostly happens when session options are read prior to the main session being created.

Since the ._current_session attribute is a weakref, the options session instance would previously be collected immediately after use, leading to repeated creation of options sessions in some cases.

… no current session

If Session.current_session is accessed without a valid current session,
an empty Session is created and retained via a strong reference. This
mostly happens when session options are read prior to the main session
being created.

Since the ._current_session attribute is a weakref, the options session
instance would previously be collected immediately after use, leading
to repeated creation of options sessions in some cases.
@flit flit merged commit 3ea6ec0 into pyocd:main May 30, 2023
@flit flit deleted the bugfix/repeated_session_load branch May 30, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant