Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Java garbage collector is called to free up unreleased memory. However, if the program relies on nonmemory resources like file descriptors and database connections, unreleased resources might lead the program to prematurely exhaust its pool of resources. In addition, if the program uses resources like Lock or Semaphore, waiting for finalize() to release the resources may lead to resource starvation. Caching of object references in the output stream also implies that the objects will not be garbage collected unless the streams are closed promptly after use.

On the Windows platform, attempts to delete open files fail silently.

Noncompliant Code Example

...