Other Resource Leaks
Learn what other resources can leak.
We'll cover the following
We characterized a program leaking memory to be one that allocates more memory than it needs. By this definition, there could be other resources provided by the platform/OS that the program could be leaking. True enough, memory leaks are just one type of leak. There are other resources that a long-running program can leak that can cause as much damage, if not more. In this lesson, we’ll take a look at some of them, and their implications on the product or process.
Socket or file handles
After memory leaks, the second most (un)popular leaks are socket or file handle leaks. Sockets and file descriptors or handles are similar on many platforms. They happen when a socket or a file is opened and not closed. On a long-running program, this will lead to a situation where the offending program eats up all remaining sockets, and there will be none left for anyone.
Get hands-on with 1400+ tech skills courses.