-
Notifications
You must be signed in to change notification settings - Fork 463
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 JsonRPc Double dispose #6901
Conversation
…ect would be disposed
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.
Dispose should be able to be called multiple times.
This looks like a proper place to dispose it in JSON RPC stack - after serialization. Where is the 2nd conflicting dispose happen?
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.
Ok its disposed just above, so its fine, but added also safe dispose recursive
True! the problem comes when attempting to access an arraypoollist that has been disposed. Theres a guard that throws an error. For example accessing Count for the purpose of looping through a list to dispose its content. |
Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com>
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks
maybe Add a property on ArrayPoolList call
isDiposed
to check if object has been disposed.useful for nested arrayPoolLists.
Since we usually want to dispose the entire collection from the top
and sometimes we dispose inner collection from somewhere else when they are passed as references.