the init/exit sequence is not cleaning up all resources. this short sequence shows the case:
from sane import init, get_devices, exit as deinit
for _ in range(99):
init()
d = get_devices()
with open("/etc/hosts") as f:
print(f.fileno())
deinit()
as you can see the fd will increase (by 78 in my case).
the init/exit sequence is not cleaning up all resources. this short sequence shows the case:
as you can see the fd will increase (by 78 in my case).