-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And added description.
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.