Fix file descriptor and directory leaks.
Review Request #14805 — Created Feb. 10, 2026 and submitted
The recent change to add
FileAttachment.sha256_checksumas a
cached_propertywas causing the files to be opened but never closed.
These would pile up, especially while running unit tests, eventually
causing operations to fail due to OS limits on the number of open files
within a process.While tracking this down, I found a handful of other places throughout
our code where we were either definitely leaking file descriptors, or
had places where an exception could cause a leak. We also never cleaned
up the tests tempdir. This change fixes those up as well.
Ran unit tests.
| Summary | ID |
|---|---|
| wrtrmuryqmsrvpmzrwulklzplkmyksyy |
| Description | From | Last Updated |
|---|---|---|
|
Should this be a try/finally? |
|