How do you close open files using Swift?
问题 I am downloading ~1300 images. Those are small images total size is around ~500KB. However, after downloading and putting them into userDefault, I get error as below: libsystem_network.dylib: nw_route_get_ifindex :: socket(PF_ROUTE, SOCK_RAW, PF_ROUTE) failed: [24] Too many open files Assumingely, downloaded png images are not being closed. I already extended cache size via below: // Configuring max network request cache size let memoryCapacity = 30 * 1024 * 1024 // 30MB let diskCapacity = 30