Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 3
    There are limits on the number of files you can have open - typically something like 512-4096. If you neglect to close your files you'll eventually get to the point where you cannot open new file descriptors (files, sockets, etc) You can easily get into this type of situation if you're crawling a directory of files and operating on each one. However, in most cases once a file descriptor object is out of scope it'll automatically be closed. However, depending on that behavior is sloppy. Commented Aug 1, 2014 at 0:09