The result is dependent on the Operating System.
When you acquire a resource (a file, a socket, ...) the system reserves you this resource offering you an exclusive access to it. Nobody else will be able to access this resource while you have it booked.
If the required access is read only, the system can offer shared access to the resource as long as all accesses are read.
If you acquire a resource but do not release it, the system maintains the reservation of it, so you prevent another application from accessing it.
What usually happens (at least in modern operating systems) is that when you close your application the resources associated with that application are automatically released ... but it does not necessarily have to be that way. If it turns out that the resources are not released they will be blocked indefinitely (because your application will no longer be able to release them when you lose their identifiers) and the only solution will be to restart the computer.
You have to be especially careful with remote resources, since then it is quite likely that the remote operating system has no record that your application has been closed, so the possibility of resources being blocked increases significantly.