zlacker
[parent]
[thread]
0 comments
1. connic+(OP)
[view]
[source]
2025-08-22 15:14:24
You do what the compiler has to do under the hood: at the top of the function create a list of open files, and have a defer statement that loops over the list closing all of the files. It's really not a complicated construct.
[go to top]