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

DM-31507 Modify data-structures to aid ref counting #563

Merged
merged 1 commit into from Aug 26, 2021

Conversation

natelust
Copy link
Contributor

It is desirable that variables get cleaned up when they go out of
scope, meaning that their ref count must go to zero. Some objects
kept closures or circular references which means they must be
cleaned by the garbage collector which can happen at unpredictable
times. Make these objects able to be dropped with reference counting.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@@ -58,6 +58,18 @@
yamlLoader = yaml.SafeLoader # type: ignore


def _doUpdate(d, u):
if not isinstance(u, collections.abc.Mapping) or \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you write this as:

if not (A and B):

then you get free line breaks due to the parentheses.

Copy link
Contributor

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (and I guess you saw flake8 complaint).

It is desirable that variables get cleaned up when they go out of
scope, meaning that their ref count must go to zero. Some objects
kept closures or circular references which means they must be
cleaned by the garbage collector which can happen at unpredictable
times. Make these objects able to be dropped with reference counting.
@natelust natelust merged commit 88dc7e5 into master Aug 26, 2021
@natelust natelust deleted the tickets/DM-31507 branch August 26, 2021 18:23
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.

None yet

3 participants