❔ [System.Text.Json] When to close the stream
I have a very large json file (500 mb or more), so naturally i would use
But what if the serializer needs the stream afterwards? If i leave it open, the stream would be dangling in limbo until the GC decides that it really wouldnt neeed that referencing memory anymore....
System.Text.Json
in combination with IAsyncEnumerable<FileMetaDataDto>
.
Now i want to open a stream to a file using the following:But what if the serializer needs the stream afterwards? If i leave it open, the stream would be dangling in limbo until the GC decides that it really wouldnt neeed that referencing memory anymore....
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.