-
Notifications
You must be signed in to change notification settings - Fork 922
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
Improve JsonDecoder StreamWriter dispose #1448
Conversation
mregen
commented
Jul 7, 2021
•
edited
edited
- only dispose StreamWriter if owned by JsonEncoder
- only dispose if dispose is called
- on external stream writer, return text by using reflection on basestream, if memorystream is used
- fixes JSONEncoder should use Stream, support leaveOpen on close #1444
{ | ||
m_writer?.Dispose(); | ||
m_writer = null; | ||
m_destination.Dispose(); |
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.
Is this really necessary? m_writer?.Dispose() should internally dispose the memory stream
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, I wasn't sure...
Codecov Report
@@ Coverage Diff @@
## master #1448 +/- ##
==========================================
+ Coverage 51.61% 51.62% +0.01%
==========================================
Files 305 305
Lines 58590 58598 +8
==========================================
+ Hits 30239 30253 +14
+ Misses 28351 28345 -6
Continue to review full report at Codecov.
|
After discussion:
|
This pull request introduces 3 alerts when merging 2c88916 into b9ad021 - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts and fixes 2 when merging 05ab8a5 into b9ad021 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 3 alerts and fixes 2 when merging e3d8c33 into 08164fe - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 3 alerts and fixes 2 when merging 45695af into 08164fe - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 3 alerts and fixes 2 when merging 6c7a801 into 08164fe - view on LGTM.com new alerts:
fixed alerts:
|