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

Fix handling of double tracking for an object. #226

Merged
merged 5 commits into from
Apr 1, 2024

Conversation

polina-c
Copy link
Contributor

@polina-c polina-c commented Mar 31, 2024

Dispatch of creation and disposal should be idempotent. Leak tracker should not fail or track the same object twice.

Issue #118 suggests more advanced handling.

@polina-c polina-c changed the title Handle double tracking for an object. Fix handling of double tracking for an object. Mar 31, 2024
Copy link
Member

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

lgtm

// Noop if object is already disposed.
if (_disposalGcCount != null) return;
if (_disposalGcCount != null) {
// It is not responsibility of leak tracker to check for double disposal.
Copy link
Member

Choose a reason for hiding this comment

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

More of a CL description would help clarify what this CL is doing. Is it handling tracking or just ignoring the double dispose problem? Would expect issue/118 would be closed if the design decision is to not handle the case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Added comment to the issue: #118 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And added description.

@polina-c polina-c merged commit 7667824 into dart-lang:main Apr 1, 2024
3 checks passed
@polina-c polina-c deleted the double-gc branch April 1, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants