Skip to content

How to close a Snapshot after using it to read a file from disk cache ? #1021

Answered by colinrtwhite
LeMimit asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks! And yep, this is intentional as we need to keep the disk snapshot open until it's finished being read by a Decoder. Otherwise, the file in the disk cache could be deleted while it's being decoded. It's always eventually closed here even if there's an uncaught exception.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LeMimit
Comment options

Answer selected by LeMimit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants