What can happen if memory allocated using new is never released when it is no longer needed?

Options

  • A. A memory leak may occur
  • B. The memory is always released immediately
  • C. The program automatically converts new to delete
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. A memory leak may occur

Detailed Explanation

Correct Answer: Option A

Explanation: If dynamically allocated memory becomes unreachable without being released, a memory leak can occur. Repeated leaks may cause a program to consume increasing amounts of memory.