resource leak

A file, socket, timer or other system resource that a program opened and never closed.

Leaked descriptors and sockets accumulate until new connections or files fail with EMFILE.

In more detail

Each leak holds a file descriptor or memory, and enough of them exhaust the process's limits. Closing resources in finally blocks, or with using declarations, prevents most leaks.

Related terms

Taught in

References