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

feat: Add register to CleanupReferenceProcessor #6213

Merged

Conversation

devinrsmith
Copy link
Member

This is inspired by java.lang.ref.Cleaner#register which makes it very easy for callers to associate a cleanup action with an object without needing to deal with a Reference or ReferenceQueue.

This is inspired by `java.lang.ref.Cleaner#register` which makes it very easy for callers to associate a cleanup action with an object without needing to deal with a Reference or ReferenceQueue.
Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

Please run nightlies if you haven't.

}

@Override
public void cleanup() {
Copy link
Member

Choose a reason for hiding this comment

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

You could use interface defaulting to avoid this duplication....

Copy link
Member Author

Choose a reason for hiding this comment

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

If there was more complex logic, I would consider it. In this case, I think per-impl is pretty straightforward.

@devinrsmith
Copy link
Member Author

running nightlies now...

@devinrsmith devinrsmith merged commit d25bfd6 into deephaven:main Oct 22, 2024
17 checks passed
@devinrsmith devinrsmith deleted the cleanup-ref-processor-register branch October 22, 2024 00:01
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants